Package org.apache.lucene.store

Examples of org.apache.lucene.store.OutputStream.writeVInt()


        int postingFreq = posting.freq;
        if (postingFreq == 1)          // optimize freq=1
          freq.writeVInt(1);        // set low bit of doc num.
        else {
          freq.writeVInt(0);        // the document number
          freq.writeVInt(postingFreq);        // frequency in doc
        }

        int lastPosition = 0;        // write positions
        int[] positions = posting.positions;
        for (int j = 0; j < postingFreq; j++) {      // use delta-encoding
View Full Code Here


  tis.add(posting.term, ti);
 
  // add an entry to the freq file
  int f = posting.freq;
  if (f == 1)          // optimize freq=1
    freq.writeVInt(1);        // set low bit of doc num.
  else {
    freq.writeVInt(0);        // the document number
    freq.writeVInt(f);        // frequency in doc
  }
 
View Full Code Here

  // add an entry to the freq file
  int f = posting.freq;
  if (f == 1)          // optimize freq=1
    freq.writeVInt(1);        // set low bit of doc num.
  else {
    freq.writeVInt(0);        // the document number
    freq.writeVInt(f);        // frequency in doc
  }
 
  int lastPosition = 0;        // write positions
  int[] positions = posting.positions;
View Full Code Here

  int f = posting.freq;
  if (f == 1)          // optimize freq=1
    freq.writeVInt(1);        // set low bit of doc num.
  else {
    freq.writeVInt(0);        // the document number
    freq.writeVInt(f);        // frequency in doc
  }
 
  int lastPosition = 0;        // write positions
  int[] positions = posting.positions;
  for (int j = 0; j < f; j++) {      // use delta-encoding
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.