jruby/docs BETA
Navigation
org.apache.lucene.codecs 40
C BlockTermState
C BufferingKnnVectorsWriter
C Codec
C CodecUtil
C CompetitiveImpactAccumulator
C CompoundDirectory
C CompoundFormat
C DocValuesConsumer
C DocValuesFormat
C DocValuesProducer
C FieldInfosFormat
C FieldsConsumer
C FieldsProducer
C FilterCodec
C Impact
C KnnFieldVectorsWriter
C KnnVectorsFormat
C KnnVectorsReader
C KnnVectorsWriter
C LiveDocsFormat
C MultiLevelSkipListReader
C MultiLevelSkipListWriter
C MutablePointTree
C NormsConsumer
C NormsFormat
C NormsProducer
C PointsFormat
C PointsReader
C PointsWriter
C PostingsFormat
C PostingsReaderBase
C PostingsWriterBase
C PushPostingsWriterBase
C SegmentInfoFormat
C StoredFieldsFormat
C StoredFieldsReader
C StoredFieldsWriter
C TermVectorsFormat
C TermVectorsReader
C TermVectorsWriter
MultiLevelSkipListWriter — members 2
C buffer_skip(df)
M write_skip(output) long

org.apache.lucene.codecs.MultiLevelSkipListWriter

class abstract 2 members

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.

Instance Methods

buffer_skip

buffer_skip ( int df )
Java: bufferSkip(int df)

Writes the current skip data to the buffers. The current document frequency determines the max level is skip data is to be written to.

nametypedescription
dfintthe current document frequency

Throws

IOException If an I/O error occurs

write_skip

long write_skip ( IndexOutput output )
Java: writeSkip(org.apache.lucene.store.IndexOutput output)

Writes the buffered skip lists to the given output.

nametypedescription
outputorg.apache.lucene.store.IndexOutputthe IndexOutput the skip lists shall be written to

Returns: the pointer the skip list starts

this work for additional information regarding copyright ownership.