Table of Contents

Internal classSealedInternal BlockPostingsWriter

Namespace
Rowles.LeanLucene.Codecs.Postings
Assembly
Rowles.LeanLucene.dll

Writes postings in packed block format (v3). Doc IDs and frequencies are written in 128-int delta-encoded packed blocks, with VarInt encoding for the tail (remaining < 128 values). Skip data is emitted after every block for efficient Advance().

internal sealed class BlockPostingsWriter : IDisposable
BlockPostingsWriter

Constructors

Public constructor BlockPostingsWriter(IndexOutput, IndexOutput?)

Methods

Public method AddPosition(int)

Adds a position for the current document. Must be called freq times between consecutive AddPosting calls.

Public method AddPosting(int, int, byte)

Adds a posting (doc ID + frequency). Call once per doc per term.

Public method Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Public method FinishTerm()

Finishes the current term's posting list. Writes any remaining tail (less than a full block) as VarInt-encoded values, then the skip index. Returns a TermPostingMetadata with the byte offsets needed for the term dictionary entry.

Public method StartTerm()

Begins a new term's posting list. Records the file offset for the skip index.