Module org.apache.lucene.codecs
Class SimpleTextSkipReader
java.lang.Object
org.apache.lucene.codecs.MultiLevelSkipListReader
org.apache.lucene.codecs.simpletext.SimpleTextSkipReader
- All Implemented Interfaces:
Closeable,AutoCloseable
This class reads skip lists with multiple levels.
See SimpleTextFieldsWriter for the information about the encoding of the multi level
skip lists.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate Impactsprivate longprivate intprivate final BytesRefBuilderprivate final CharsRefBuilderFields inherited from class org.apache.lucene.codecs.MultiLevelSkipListReader
maxNumberOfSkipLevels, numberOfSkipLevels, skipDoc -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) Impacts(package private) int(package private) long(package private) booleanprivate voidinit()protected longreadChildPointer(IndexInput skipStream) read the child pointer written viaMultiLevelSkipListWriter.writeChildPointer(long, DataOutput).protected longreadLevelLength(IndexInput skipStream) read the length of the current level written viaMultiLevelSkipListWriter.writeLevelLength(long, IndexOutput).protected intreadSkipData(int level, IndexInput skipStream) Subclasses must implement the actual skip data encoding in this method.(package private) voidreset(long skipPointer, int docFreq) intskipTo(int target) Skips entries to the first beyond the current whose document number is greater than or equal to target.Methods inherited from class org.apache.lucene.codecs.MultiLevelSkipListReader
close, getDoc, init, seekChild, setLastSkipData
-
Field Details
-
scratchUTF16
-
scratch
-
impacts
-
perLevelImpacts
-
nextSkipDocFP
private long nextSkipDocFP -
numLevels
private int numLevels -
hasSkipList
private boolean hasSkipList
-
-
Constructor Details
-
SimpleTextSkipReader
SimpleTextSkipReader(IndexInput skipStream)
-
-
Method Details
-
skipTo
Description copied from class:MultiLevelSkipListReaderSkips entries to the first beyond the current whose document number is greater than or equal to target. Returns the current doc count.- Overrides:
skipToin classMultiLevelSkipListReader- Throws:
IOException
-
readSkipData
Description copied from class:MultiLevelSkipListReaderSubclasses must implement the actual skip data encoding in this method.- Specified by:
readSkipDatain classMultiLevelSkipListReader- Parameters:
level- the level skip data shall be read fromskipStream- the skip stream to read from- Throws:
IOException
-
readLevelLength
Description copied from class:MultiLevelSkipListReaderread the length of the current level written viaMultiLevelSkipListWriter.writeLevelLength(long, IndexOutput).- Overrides:
readLevelLengthin classMultiLevelSkipListReader- Parameters:
skipStream- the IndexInput the length shall be read from- Returns:
- level length
- Throws:
IOException
-
readChildPointer
Description copied from class:MultiLevelSkipListReaderread the child pointer written viaMultiLevelSkipListWriter.writeChildPointer(long, DataOutput).- Overrides:
readChildPointerin classMultiLevelSkipListReader- Parameters:
skipStream- the IndexInput the child pointer shall be read from- Returns:
- child pointer
- Throws:
IOException
-
reset
- Throws:
IOException
-
init
private void init() -
getImpacts
Impacts getImpacts() -
getNextSkipDocFP
long getNextSkipDocFP() -
getNextSkipDoc
int getNextSkipDoc() -
hasSkipList
boolean hasSkipList()
-