Class SimpleTextSkipReader
- java.lang.Object
-
- org.apache.lucene.codecs.MultiLevelSkipListReader
-
- org.apache.lucene.codecs.simpletext.SimpleTextSkipReader
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
class SimpleTextSkipReader extends MultiLevelSkipListReader
This class reads skip lists with multiple levels.See
SimpleTextFieldsWriterfor the information about the encoding of the multi level skip lists.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanhasSkipListprivate Impactsimpactsprivate longnextSkipDocFPprivate intnumLevelsprivate java.util.List<java.util.List<Impact>>perLevelImpactsprivate BytesRefBuilderscratchprivate CharsRefBuilderscratchUTF16-
Fields inherited from class org.apache.lucene.codecs.MultiLevelSkipListReader
maxNumberOfSkipLevels, numberOfSkipLevels, skipDoc
-
-
Constructor Summary
Constructors Constructor Description SimpleTextSkipReader(IndexInput skipStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) ImpactsgetImpacts()(package private) intgetNextSkipDoc()(package private) longgetNextSkipDocFP()(package private) booleanhasSkipList()private 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 Detail
-
scratchUTF16
private final CharsRefBuilder scratchUTF16
-
scratch
private final BytesRefBuilder scratch
-
impacts
private Impacts impacts
-
perLevelImpacts
private java.util.List<java.util.List<Impact>> perLevelImpacts
-
nextSkipDocFP
private long nextSkipDocFP
-
numLevels
private int numLevels
-
hasSkipList
private boolean hasSkipList
-
-
Constructor Detail
-
SimpleTextSkipReader
SimpleTextSkipReader(IndexInput skipStream)
-
-
Method Detail
-
skipTo
public int skipTo(int target) throws java.io.IOExceptionDescription 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:
java.io.IOException
-
readSkipData
protected int readSkipData(int level, IndexInput skipStream) throws java.io.IOExceptionDescription 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:
java.io.IOException
-
readLevelLength
protected long readLevelLength(IndexInput skipStream) throws java.io.IOException
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:
java.io.IOException
-
readChildPointer
protected long readChildPointer(IndexInput skipStream) throws java.io.IOException
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:
java.io.IOException
-
reset
void reset(long skipPointer, int docFreq) throws java.io.IOException- Throws:
java.io.IOException
-
init
private void init()
-
getImpacts
Impacts getImpacts()
-
getNextSkipDocFP
long getNextSkipDocFP()
-
getNextSkipDoc
int getNextSkipDoc()
-
hasSkipList
boolean hasSkipList()
-
-