Class Lucene99SkipWriter
java.lang.Object
org.apache.lucene.codecs.MultiLevelSkipListWriter
org.apache.lucene.backward_codecs.lucene99.Lucene99SkipWriter
Write skip lists with multiple levels, and support skip within block ints.
Assume that docFreq = 28, skipInterval = blockSize = 12
| block#0 | | block#1 | |vInts| d d d d d d d d d d d d d d d d d d d d d d d d d d d d (posting list) ^ ^ (level 0 skip point)
Note that skipWriter will ignore first document in block#0, since it is useless as a skip point. Also, we'll never skip into the vInts block, only record skip data at the start its start point(if it exist).
For each skip point, we will record: 1. docID in former position, i.e. for position 12, record docID[11], etc. 2. its related file points(position, payload), 3. related numbers or uptos(position, payload). 4. start offset.
-
Field Summary
Fields inherited from class org.apache.lucene.codecs.MultiLevelSkipListWriter
numberOfSkipLevels
-
Constructor Summary
ConstructorsConstructorDescriptionLucene99SkipWriter
(int maxSkipLevels, int blockSize, int docCount, IndexOutput docOut, IndexOutput posOut, IndexOutput payOut) Sole constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
bufferSkip
(int doc, CompetitiveImpactAccumulator competitiveFreqNorms, int numDocs, long posFP, long payFP, int posBufferUpto, int payloadByteUpto) Sets the values for the current skip data.void
void
setField
(boolean fieldHasPositions, boolean fieldHasOffsets, boolean fieldHasPayloads) Reset state for the given index options.static void
Write impacts to the given output.protected void
writeSkipData
(int level, DataOutput skipBuffer) Methods inherited from class org.apache.lucene.codecs.MultiLevelSkipListWriter
bufferSkip, init, writeChildPointer, writeLevelLength, writeSkip
-
Constructor Details
-
Lucene99SkipWriter
public Lucene99SkipWriter(int maxSkipLevels, int blockSize, int docCount, IndexOutput docOut, IndexOutput posOut, IndexOutput payOut) Sole constructor.
-
-
Method Details
-
setField
public void setField(boolean fieldHasPositions, boolean fieldHasOffsets, boolean fieldHasPayloads) Reset state for the given index options. -
resetSkip
public void resetSkip()- Overrides:
resetSkip
in classMultiLevelSkipListWriter
-
bufferSkip
public void bufferSkip(int doc, CompetitiveImpactAccumulator competitiveFreqNorms, int numDocs, long posFP, long payFP, int posBufferUpto, int payloadByteUpto) throws IOException Sets the values for the current skip data.- Throws:
IOException
-
writeSkipData
- Specified by:
writeSkipData
in classMultiLevelSkipListWriter
- Throws:
IOException
-
writeImpacts
public static void writeImpacts(CompetitiveImpactAccumulator acc, DataOutput out) throws IOException Write impacts to the given output.- Throws:
IOException
-