Package org.apache.lucene.store

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


      BytesRef scratch = new BytesRef(bytes);
      BinaryDocValues dv = reader.getBinaryDocValues("dv");
      for (int i = 0; i < reader.maxDoc(); i++) {
        dv.get(i, scratch);
        input.reset(scratch.bytes, scratch.offset, scratch.length);
        assertEquals(expectedValue % 65535, input.readVInt());
        assertTrue(input.eof());
        expectedValue++;
      }
    }
   
View Full Code Here


      AtomicReader reader = context.reader();
      BinaryDocValues dv = reader.getBinaryDocValues("dv");
      for (int i = 0; i < reader.maxDoc(); i++) {
        final BytesRef term = dv.get(i);
        input.reset(term.bytes, term.offset, term.length);
        assertEquals(expectedValue % 65535, input.readVInt());
        assertTrue(input.eof());
        expectedValue++;
      }
    }
   
View Full Code Here

      BytesRef scratch = new BytesRef(bytes);
      BinaryDocValues dv = reader.getBinaryDocValues("dv");
      for (int i = 0; i < reader.maxDoc(); i++) {
        dv.get(i, scratch);
        input.reset(scratch.bytes, scratch.offset, scratch.length);
        assertEquals(expectedValue % 65535, input.readVInt());
        assertTrue(input.eof());
        expectedValue++;
      }
    }
   
View Full Code Here

                final BytesRef bytes = values.get(docId);
                in.reset(bytes.bytes, bytes.offset, bytes.length);
                if (bytes.length == 0) {
                    count = 0;
                } else {
                    count = in.readVInt();
                    if (count > refs.length) {
                        final int previousLength = refs.length;
                        refs = Arrays.copyOf(refs, ArrayUtil.oversize(count, RamUsageEstimator.NUM_BYTES_OBJECT_REF));
                        for (int i = previousLength; i < refs.length; ++i) {
                            refs[i] = new BytesRefBuilder();
View Full Code Here

                        for (int i = previousLength; i < refs.length; ++i) {
                            refs[i] = new BytesRefBuilder();
                        }
                    }
                    for (int i = 0; i < count; ++i) {
                        final int length = in.readVInt();
                        final BytesRefBuilder scratch = refs[i];
                        scratch.grow(length);
                        in.readBytes(scratch.bytes(), 0, length);
                        scratch.setLength(length);
                    }
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.