Package org.apache.lucene.codecs
Class MultiLevelSkipListReader
java.lang.Object
org.apache.lucene.codecs.MultiLevelSkipListReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
Lucene40SkipListReader
This abstract class reads skip lists with multiple levels.
See
MultiLevelSkipListWriter
for the information about the encoding
of the multi level skip lists.
Subclasses must implement the abstract method readSkipData(int, IndexInput)
which defines the actual format of the skip data.-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
int
getDoc()
Returns the id of the doc to which the last call ofskipTo(int)
has skipped.void
init
(long skipPointer, int df) Initializes the reader, for reuse on a new term.int
skipTo
(int target) Skips entries to the first beyond the current whose document number is greater than or equal to target.
-
Method Details
-
getDoc
public int getDoc()Returns the id of the doc to which the last call ofskipTo(int)
has skipped. -
skipTo
Skips entries to the first beyond the current whose document number is greater than or equal to target. Returns the current doc count.- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
init
public void init(long skipPointer, int df) Initializes the reader, for reuse on a new term.
-