Exemple #1
0
        private void  WriteTerm(Term term)
        {
            int start  = StringHelper.StringDifference(lastTerm.text, term.text);
            int length = term.text.Length - start;

            output.WriteVInt(start);                              // write shared prefix length
            output.WriteVInt(length);                             // write delta length
            output.WriteChars(term.text, start, length);          // write delta chars

            output.WriteVInt(fieldInfos.FieldNumber(term.field)); // write Field num

            lastTerm = term;
        }