Skip to main content

Module postings

Module postings 

Source
Expand description

Posting storage shared by every id-list index (–3).

One shape serves BM25 postings, tag → facts and entity → facts: a plugmem_arena::Arena of per-key handle slots plus one ChunkPool holding the lists. Entries are appended in ascending fact-id order (ids are assigned monotonically, so appends keep lists sorted for free) and encoded as varint deltas — [delta] for plain id lists, [delta][tf u8] for BM25 (TF = true).

Each entry is pushed as one ChunkPool value, so entries never straddle chunk boundaries and decoding walks whole entries per chunk slice.

Structs§

Entries
Iterator over one list’s (id, tf) entries; see PostingStore::entries.
IdListSlot
Per-key slot: [key 4 | ListHandle 12 | count u32 | last u32], 24 bytes, Uniform arena. count doubles as the document frequency for BM25; last is the highest id in the list (the delta base).
PostingStore
Key → sorted id list storage; TF adds a one-byte term frequency to every entry (the BM25 flavor).