java.lang.Object
org.apache.lucene.util.packed.DirectReader
Retrieves an instance previously written by
DirectWriter
Example usage:
int bitsPerValue = 100; IndexInput in = dir.openInput("packed", IOContext.DEFAULT); LongValues values = DirectReader.getInstance(in.randomAccessSlice(start, end), bitsPerValue); for (int i = 0; i < numValues; i++) { long value = values.get(i); }
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
(package private) static final int
private static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LongValues
getInstance
(RandomAccessInput slice, int bitsPerValue) Retrieves an instance from the specified slice written decodingbitsPerValue
for each valuestatic LongValues
getInstance
(RandomAccessInput slice, int bitsPerValue, long offset) Retrieves an instance from the specifiedoffset
of the given slice decodingbitsPerValue
for each valuestatic LongValues
getMergeInstance
(RandomAccessInput slice, int bitsPerValue, long numValues) Retrieves an instance that is specialized for merges and is typically faster at sequential access but slower at random access.static LongValues
getMergeInstance
(RandomAccessInput slice, int bitsPerValue, long baseOffset, long numValues) Retrieves an instance that is specialized for merges and is typically faster at sequential access.
-
Field Details
-
MERGE_BUFFER_SHIFT
static final int MERGE_BUFFER_SHIFT- See Also:
-
MERGE_BUFFER_SIZE
private static final int MERGE_BUFFER_SIZE- See Also:
-
MERGE_BUFFER_MASK
private static final int MERGE_BUFFER_MASK- See Also:
-
-
Constructor Details
-
DirectReader
public DirectReader()
-
-
Method Details
-
getInstance
Retrieves an instance from the specified slice written decodingbitsPerValue
for each value -
getInstance
Retrieves an instance from the specifiedoffset
of the given slice decodingbitsPerValue
for each value -
getMergeInstance
public static LongValues getMergeInstance(RandomAccessInput slice, int bitsPerValue, long numValues) Retrieves an instance that is specialized for merges and is typically faster at sequential access but slower at random access. -
getMergeInstance
public static LongValues getMergeInstance(RandomAccessInput slice, int bitsPerValue, long baseOffset, long numValues) Retrieves an instance that is specialized for merges and is typically faster at sequential access.
-