Class MultiLevelSkipListWriter
This abstract class writes skip lists with multiple levels.
Example for skipInterval = 3:
c (skip level 2)
c c c (skip level 1)
x x x x x x x x x x (skip level 0)
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 d d d d (posting list)
3 6 9 12 15 18 21 24 27 30 (df)
d - document
x - skip data
c - skip data with child pointer
Skip level i contains every skipInterval-th entry from skip level i-1.
Therefore the number of entries on level i is: floor(df / ((skipInterval ^ (i + 1))).
Each skip entry on a level i>0 contains a pointer to the corresponding skip entry in list i-1.
this guarantees a logarithmic amount of skips to find the target document.
While this class takes care of writing the different skip levels,
subclasses must define the actual format of the skip data.
@lucene.experimental
Inheritance
Assembly: DistributedLucene.Net.dll
Syntax
public abstract class MultiLevelSkipListWriter : object
Constructors
Name | Description |
---|---|
MultiLevelSkipListWriter(Int32, Int32, Int32) | Creates a MultiLevelSkipListWriter, where Lucene.Net.Codecs.MultiLevelSkipListWriter.skipInterval and Lucene.Net.Codecs.MultiLevelSkipListWriter.skipMultiplier are the same. |
MultiLevelSkipListWriter(Int32, Int32, Int32, Int32) | Creates a MultiLevelSkipListWriter. |
Fields
Name | Description |
---|---|
m_numberOfSkipLevels | Number of levels in this skip list. |
Methods
Name | Description |
---|---|
BufferSkip(Int32) | Writes the current skip data to the buffers. The current document frequency determines the max level is skip data is to be written to. |
Init() | Allocates internal skip buffers. |
ResetSkip() | Creates new buffers or empties the existing ones. |
WriteSkip(IndexOutput) | Writes the buffered skip lists to the given output. |
WriteSkipData(Int32, IndexOutput) | Subclasses must implement the actual skip data encoding in this method. |