Table of Contents

Internal classSealedInternal PostingAccumulator

Namespace
Rowles.LeanLucene.Index.Indexer
Assembly
Rowles.LeanLucene.dll

Accumulates doc IDs, term frequencies, and positions for a single qualified term during indexing. Uses ArrayPool-backed buffers to avoid GC pressure from repeated resize-copy-abandon cycles. Call ReturnBuffers() after flush to return rented arrays.

internal sealed class PostingAccumulator
PostingAccumulator

Public constructor PostingAccumulator()

Public property Count

Public property DocIds

Public property EstimatedBytes

Estimated heap bytes consumed by this accumulator's pooled buffers, plus a fixed 64-byte overhead for the object itself. Cached and updated only when buffers grow, so reads are O(1).

Public property HasFreqs

Public property HasPayloads

Public property HasPositions

Public method Add(int, int)

Public method AddDocOnly(int)

Public method AddWithPayload(int, int, byte[]?)

Public method GetFreq(int)

Public method GetPayload(int, int)

Public method GetPositions(int)

Public method RemapDocIds(int[])

Translates doc IDs using the inverse permutation and re-sorts entries so doc IDs remain in ascending order (required by the postings codec).

Public method ReturnBuffers()

Returns all pooled arrays. Call once after flush; do not use the accumulator afterwards.