Examples of readVInt()


Examples of org.apache.lucene.store.IndexInput.readVInt()

        CodecUtil.checkHeader(in, PulsingPostingsWriter.CODEC, version,
                              PulsingPostingsWriter.VERSION_CURRENT);
        int numField = in.readVInt();
        for (int i = 0; i < numField; i++) {
          int fieldNum = in.readVInt();
          int longsSize = in.readVInt();
          fields.put(fieldNum, longsSize);
        }
      } finally {
        IOUtils.closeWhileHandlingException(in);
      }
View Full Code Here

Examples of org.apache.lucene.store.IndexInput.readVInt()

    private final int fillDocs(int size) throws IOException {
      final IndexInput freqIn = this.freqIn;
      final int docs[] = this.docs;
      int docAc = accum;
      for (int i = 0; i < size; i++) {
        docAc += freqIn.readVInt();
        docs[i] = docAc;
      }
      accum = docAc;
      return size;
    }
View Full Code Here

Examples of org.apache.lucene.store.IndexInput.readVInt()

      final IndexInput freqIn = this.freqIn;
      final int docs[] = this.docs;
      final int freqs[] = this.freqs;
      int docAc = accum;
      for (int i = 0; i < size; i++) {
        final int code = freqIn.readVInt();
        docAc += code >>> 1; // shift off low bit
        freqs[i] = readFreq(freqIn, code);
        docs[i] = docAc;
      }
      accum = docAc;
View Full Code Here

Examples of org.apache.lucene.store.IndexInput.readVInt()

      int frq = 1;
      final IndexInput freqIn = this.freqIn;
      final boolean omitTF = indexOmitsTF;
      final int loopLimit = limit;
      for (int i = ord; i < loopLimit; i++) {
        int code = freqIn.readVInt();
        if (omitTF) {
          docAcc += code;
        } else {
          docAcc += code >>> 1; // shift off low bit
          frq = readFreq(freqIn, code);
View Full Code Here

Examples of org.apache.lucene.store.IndexInput.readVInt()

      final IndexInput freqIn = this.freqIn;
      final boolean omitTF = indexOmitsTF;
      final int loopLimit = limit;
      final Bits liveDocs = this.liveDocs;
      for (int i = ord; i < loopLimit; i++) {
        int code = freqIn.readVInt();
        if (omitTF) {
          docAcc += code;
        } else {
          docAcc += code >>> 1; // shift off low bit
          frq = readFreq(freqIn, code);
View Full Code Here

Examples of org.apache.lucene.store.IndexInput.readVInt()

      final IndexInput freqIn = this.freqIn;
      final boolean omitTF = indexOmitsTF;
      final int loopLimit = limit;
      final Bits liveDocs = this.liveDocs;
      for (int i = ord; i < loopLimit; i++) {
        int code = freqIn.readVInt();
        if (omitTF) {
          docAcc += code;
        } else {
          docAcc += code >>> 1; // shift off low bit
          frq = readFreq(freqIn, code);
View Full Code Here

Examples of org.apache.lucene.store.InputStream.readVInt()

        InputStream is = new MockInputStream(new byte[] { (byte) 0x80, 0x01,
                                                          (byte) 0xFF, 0x7F,
                                                          (byte) 0x80, (byte) 0x80, 0x01,
                                                          (byte) 0x81, (byte) 0x80, 0x01,
                                                          0x06, 'L', 'u', 'c', 'e', 'n', 'e'});
        assertEquals(128,is.readVInt());
        assertEquals(16383,is.readVInt());
        assertEquals(16384,is.readVInt());
        assertEquals(16385,is.readVInt());
        assertEquals("Lucene",is.readString());
    }
View Full Code Here

Examples of org.apache.lucene.store.InputStream.readVInt()

                                                          (byte) 0xFF, 0x7F,
                                                          (byte) 0x80, (byte) 0x80, 0x01,
                                                          (byte) 0x81, (byte) 0x80, 0x01,
                                                          0x06, 'L', 'u', 'c', 'e', 'n', 'e'});
        assertEquals(128,is.readVInt());
        assertEquals(16383,is.readVInt());
        assertEquals(16384,is.readVInt());
        assertEquals(16385,is.readVInt());
        assertEquals("Lucene",is.readString());
    }
}
View Full Code Here

Examples of org.apache.lucene.store.InputStream.readVInt()

                                                          (byte) 0x80, (byte) 0x80, 0x01,
                                                          (byte) 0x81, (byte) 0x80, 0x01,
                                                          0x06, 'L', 'u', 'c', 'e', 'n', 'e'});
        assertEquals(128,is.readVInt());
        assertEquals(16383,is.readVInt());
        assertEquals(16384,is.readVInt());
        assertEquals(16385,is.readVInt());
        assertEquals("Lucene",is.readString());
    }
}
View Full Code Here

Examples of org.apache.lucene.store.InputStreamDataInput.readVInt()

    CodecUtil.checkHeader(in, CODEC_NAME, VERSION_START, VERSION_START);
    byte separatorOrig = in.readByte();
    if (separatorOrig != separator) {
      throw new IllegalStateException("separator=" + separator + " is incorrect: original model was built with separator=" + separatorOrig);
    }
    int gramsOrig = in.readVInt();
    if (gramsOrig != grams) {
      throw new IllegalStateException("grams=" + grams + " is incorrect: original model was built with grams=" + gramsOrig);
    }
    totTokens = in.readVLong();
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.