

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
Constructors
Methods
AddPosition(int)
Adds a position for the current document. Must be called freq times between consecutive AddPosting calls.
AddPosting(int, int, byte)
Adds a posting (doc ID + frequency). Call once per doc per term.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
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.
StartTerm()
Begins a new term's posting list. Records the file offset for the skip index.