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 boolean
private Impacts
private long
private int
private final BytesRefBuilder
private final CharsRefBuilder
Fields 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) boolean
private void
init()
protected long
readChildPointer
(IndexInput skipStream) read the child pointer written viaMultiLevelSkipListWriter.writeChildPointer(long, DataOutput)
.protected long
readLevelLength
(IndexInput skipStream) read the length of the current level written viaMultiLevelSkipListWriter.writeLevelLength(long, IndexOutput)
.protected int
readSkipData
(int level, IndexInput skipStream) Subclasses must implement the actual skip data encoding in this method.(package private) void
reset
(long skipPointer, int docFreq) int
skipTo
(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:MultiLevelSkipListReader
Skips entries to the first beyond the current whose document number is greater than or equal to target. Returns the current doc count.- Overrides:
skipTo
in classMultiLevelSkipListReader
- Throws:
IOException
-
readSkipData
Description copied from class:MultiLevelSkipListReader
Subclasses must implement the actual skip data encoding in this method.- Specified by:
readSkipData
in classMultiLevelSkipListReader
- Parameters:
level
- the level skip data shall be read fromskipStream
- the skip stream to read from- Throws:
IOException
-
readLevelLength
Description copied from class:MultiLevelSkipListReader
read the length of the current level written viaMultiLevelSkipListWriter.writeLevelLength(long, IndexOutput)
.- Overrides:
readLevelLength
in classMultiLevelSkipListReader
- Parameters:
skipStream
- the IndexInput the length shall be read from- Returns:
- level length
- Throws:
IOException
-
readChildPointer
Description copied from class:MultiLevelSkipListReader
read the child pointer written viaMultiLevelSkipListWriter.writeChildPointer(long, DataOutput)
.- Overrides:
readChildPointer
in 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()
-