Lucene99SkipWriter (Lucene 10.5.1 backward-codecs API)
Description: declaration: package: org.apache.lucene.backward_codecs.lucene99, class: Lucene99SkipWriter

Package org.apache.lucene.backward_codecs.lucene99

# Class Lucene99SkipWriter

java.lang.Object
org.apache.lucene.codecs.MultiLevelSkipListWriter
org.apache.lucene.backward_codecs.lucene99.Lucene99SkipWriter

public final class Lucene99SkipWriter extends MultiLevelSkipListWriter
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

  Constructors
  Constructor
  Description
  `Lucene99SkipWriter(int maxSkipLevels, int blockSize, int docCount, IndexOutput docOut, IndexOutput posOut, IndexOutput payOut)`
  Sole constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `bufferSkip(int doc, CompetitiveImpactAccumulator competitiveFreqNorms, int numDocs, long posFP, long payFP, int posBufferUpto, int payloadByteUpto)`
  Sets the values for the current skip data.
  `void`
  `resetSkip()`
  `void`
  `setField(boolean fieldHasPositions, boolean fieldHasOffsets, boolean fieldHasPayloads)`
  Reset state for the given index options.
  `static void`
  `writeImpacts(CompetitiveImpactAccumulator acc, DataOutput out)`
  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`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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 class `MultiLevelSkipListWriter`

  - ### 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

    protected void writeSkipData(int level, DataOutput skipBuffer) throws IOException
    Specified by:
      `writeSkipData` in class `MultiLevelSkipListWriter`
    Throws:
      `IOException`

  - ### writeImpacts

    public static void writeImpacts(CompetitiveImpactAccumulator acc, DataOutput out) throws IOException
    Write impacts to the given output.
    Throws:
      `IOException`