Class SimpleTextSkipWriter
- java.lang.Object
-
- org.apache.lucene.codecs.MultiLevelSkipListWriter
-
- org.apache.lucene.codecs.simpletext.SimpleTextSkipWriter
-
class SimpleTextSkipWriter extends MultiLevelSkipListWriter
plain text skip data.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static intBLOCK_SIZE(package private) static BytesRefCHILD_POINTERprivate CompetitiveImpactAccumulator[]curCompetitiveFreqNormsprivate intcurDocprivate longcurDocFilePointer(package private) static BytesRefFREQ(package private) static BytesRefIMPACT(package private) static BytesRefIMPACTS(package private) static BytesRefIMPACTS_END(package private) static BytesRefLEVEL(package private) static BytesRefLEVEL_LENGTH(package private) static intmaxSkipLevels(package private) static BytesRefNORMprivate BytesRefBuilderscratch(package private) static BytesRefSKIP_DOC(package private) static BytesRefSKIP_DOC_FP(package private) static BytesRefSKIP_LIST(package private) static intskipMultiplierprivate java.util.Map<java.lang.Integer,java.lang.Boolean>wroteHeaderPerLevelMap-
Fields inherited from class org.apache.lucene.codecs.MultiLevelSkipListWriter
numberOfSkipLevels
-
-
Constructor Summary
Constructors Constructor Description SimpleTextSkipWriter(SegmentWriteState writeState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidbufferSkip(int doc, long docFilePointer, int numDocs, CompetitiveImpactAccumulator competitiveImpactAccumulator)protected voidresetSkip()Creates new buffers or empties the existing onesprotected voidwriteChildPointer(long childPointer, DataOutput skipBuffer)Writes the child pointer of a block to the given output.protected voidwriteLevelLength(long levelLength, IndexOutput output)Writes the length of a level to the given output.longwriteSkip(IndexOutput output)Writes the buffered skip lists to the given output.protected voidwriteSkipData(int level, DataOutput skipBuffer)Subclasses must implement the actual skip data encoding in this method.-
Methods inherited from class org.apache.lucene.codecs.MultiLevelSkipListWriter
bufferSkip, init
-
-
-
-
Field Detail
-
skipMultiplier
static final int skipMultiplier
- See Also:
- Constant Field Values
-
maxSkipLevels
static final int maxSkipLevels
- See Also:
- Constant Field Values
-
BLOCK_SIZE
static final int BLOCK_SIZE
- See Also:
- Constant Field Values
-
wroteHeaderPerLevelMap
private java.util.Map<java.lang.Integer,java.lang.Boolean> wroteHeaderPerLevelMap
-
curDoc
private int curDoc
-
curDocFilePointer
private long curDocFilePointer
-
curCompetitiveFreqNorms
private CompetitiveImpactAccumulator[] curCompetitiveFreqNorms
-
scratch
private final BytesRefBuilder scratch
-
SKIP_LIST
static final BytesRef SKIP_LIST
-
LEVEL_LENGTH
static final BytesRef LEVEL_LENGTH
-
LEVEL
static final BytesRef LEVEL
-
SKIP_DOC
static final BytesRef SKIP_DOC
-
SKIP_DOC_FP
static final BytesRef SKIP_DOC_FP
-
IMPACTS
static final BytesRef IMPACTS
-
IMPACT
static final BytesRef IMPACT
-
FREQ
static final BytesRef FREQ
-
NORM
static final BytesRef NORM
-
IMPACTS_END
static final BytesRef IMPACTS_END
-
CHILD_POINTER
static final BytesRef CHILD_POINTER
-
-
Constructor Detail
-
SimpleTextSkipWriter
SimpleTextSkipWriter(SegmentWriteState writeState) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
writeSkipData
protected void writeSkipData(int level, DataOutput skipBuffer) throws java.io.IOExceptionDescription copied from class:MultiLevelSkipListWriterSubclasses must implement the actual skip data encoding in this method.- Specified by:
writeSkipDatain classMultiLevelSkipListWriter- Parameters:
level- the level skip data shall be writing forskipBuffer- the skip buffer to write to- Throws:
java.io.IOException
-
resetSkip
protected void resetSkip()
Description copied from class:MultiLevelSkipListWriterCreates new buffers or empties the existing ones- Overrides:
resetSkipin classMultiLevelSkipListWriter
-
writeSkip
public long writeSkip(IndexOutput output) throws java.io.IOException
Description copied from class:MultiLevelSkipListWriterWrites the buffered skip lists to the given output.- Overrides:
writeSkipin classMultiLevelSkipListWriter- Parameters:
output- the IndexOutput the skip lists shall be written to- Returns:
- the pointer the skip list starts
- Throws:
java.io.IOException
-
bufferSkip
void bufferSkip(int doc, long docFilePointer, int numDocs, CompetitiveImpactAccumulator competitiveImpactAccumulator) throws java.io.IOException- Throws:
java.io.IOException
-
writeLevelLength
protected void writeLevelLength(long levelLength, IndexOutput output) throws java.io.IOExceptionDescription copied from class:MultiLevelSkipListWriterWrites the length of a level to the given output.- Overrides:
writeLevelLengthin classMultiLevelSkipListWriter- Parameters:
levelLength- the length of a leveloutput- the IndexOutput the length shall be written to- Throws:
java.io.IOException
-
writeChildPointer
protected void writeChildPointer(long childPointer, DataOutput skipBuffer) throws java.io.IOExceptionDescription copied from class:MultiLevelSkipListWriterWrites the child pointer of a block to the given output.- Overrides:
writeChildPointerin classMultiLevelSkipListWriter- Parameters:
childPointer- block of higher level point to the lower levelskipBuffer- the skip buffer to write to- Throws:
java.io.IOException
-
-