Package org.apache.lucene.util.packed
Class DirectMonotonicReader
java.lang.Object
org.apache.lucene.util.LongValues
org.apache.lucene.util.packed.DirectMonotonicReader
Retrieves an instance previously written by
DirectMonotonicWriter.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classIn-memory metadata that needs to be kept around forDirectMonotonicReaderto read data from disk. -
Field Summary
Fields inherited from class org.apache.lucene.util.LongValues
IDENTITY, ZEROES -
Method Summary
Modifier and TypeMethodDescriptionlongbinarySearch(long fromIndex, long toIndex, long key) Return the index of a key if it exists, or its insertion point otherwise likeArrays.binarySearch(long[], int, int, long).longget(long index) Get value atindex.static DirectMonotonicReadergetInstance(DirectMonotonicReader.Meta meta, RandomAccessInput data) Retrieves a non-merging instance from the specified slice.static DirectMonotonicReadergetInstance(DirectMonotonicReader.Meta meta, RandomAccessInput data, boolean merging) Retrieves an instance from the specified slice.static DirectMonotonicReader.MetaloadMeta(IndexInput metaIn, long numValues, int blockShift) Load metadata from the givenIndexInput.
-
Method Details
-
loadMeta
public static DirectMonotonicReader.Meta loadMeta(IndexInput metaIn, long numValues, int blockShift) throws IOException Load metadata from the givenIndexInput.- Throws:
IOException- See Also:
-
getInstance
public static DirectMonotonicReader getInstance(DirectMonotonicReader.Meta meta, RandomAccessInput data) throws IOException Retrieves a non-merging instance from the specified slice.- Throws:
IOException
-
getInstance
public static DirectMonotonicReader getInstance(DirectMonotonicReader.Meta meta, RandomAccessInput data, boolean merging) throws IOException Retrieves an instance from the specified slice.- Throws:
IOException
-
get
public long get(long index) Description copied from class:LongValuesGet value atindex.- Specified by:
getin classLongValues
-
binarySearch
public long binarySearch(long fromIndex, long toIndex, long key) Return the index of a key if it exists, or its insertion point otherwise likeArrays.binarySearch(long[], int, int, long).- See Also:
-