Skip to main content

Module read_model

Module read_model 

Source
Expand description

Store-served search (ADR-104) — decided find answered from the memory- mapped base, byte-identical to the fresh walk (INDEX-PLAN B3).

The candidate set comes from the term-major postings and only candidates are reconstructed; the corpus-global statistics the scorer needs — n and the per-field Σ from the header, document frequency from the prefix ranges — carry the non-matching corpus’s contribution without touching its rows. Matching, snippets, and ranking run through the one shared rank_and_build tail, so warm bytes equal cold bytes by construction.

Deliberate divergence from the oracle’s warm path (PORT-CONTRACT.d/10 §0a): a query term listed twice contributes its document frequency once per OCCURRENCE here, exactly as the fresh walk counts it. The oracle’s store path dedups (an ADR-112 violation recorded as an oracle defect); the native engine keeps warm == cold instead.

Functions§

find_decisions_in
find_decisions_in over already-derived structures — the fresh-build arm of the cache seam (_find_from_store’s else branch).
store_find_decisions
Live-decision topic search served from the store (ADR-067): the decision-typed search, then the liveness filter over the precomputed live-decision paths — ReadModelView.find_decisions.
store_identity_entries
Every identity row of the mapped base, in docid (walk) order — the materialised projection get_related’s graph helpers read.
store_resolve
Point resolution over the persisted alias map — Fold.resolve, byte-identical to resolve_in_index over a walk of the same corpus.
store_search
decided find served from the store — reproduces search_index_filtered.