pub enum IdSpaceKind {
Logical,
Content,
Passage,
}Expand description
A single structured search hit (G1 / AC-057a-clean).
Both retrieval branches emit this shape. id is a typed IdSpace — the
permanent caller-facing identity since C-2 (0.8.19 / TC-8), NOT the
interim write_cursor: u64 the pre-0.8.19 releases carried and NOT an
interim carrier awaiting a later swap. The positional write_cursor field
below survives as engine-internal book-keeping and the SDK bindings do not
surface it. See the field docs on SearchHit::id / IdSpace.
score is the G9 RRF-fused relevance (Σ 1/(RRF_K + rank) over the
branches that surfaced this body; higher = more relevant), optionally
recency-reweighted when the dedicated recency flag is on. Raw vec_distance_l2
and bm25() are fused on rank, never compared raw (they are not
comparable). branch tags which retrieval branch produced the representative
hit (vector-first when a body is surfaced by both).
source_id (G0 Phase-2 / BLOCK-2; generalised by TC-31 in 0.8.20 Slice 10a)
carries the source-document provenance of a hit — the identifier
Engine::erase_source consumes. It is populated on every hit path:
- Node hits (text/BM25F, vector, and the pre-step-12 legacy text
fallback) carry the node’s own
canonical_nodes.source_id. - Edge hits (edge-FTS from
search_index_edges, and edge-fact hits hydrated by the vector arm) carry the edge’s owncanonical_edges.source_id. - GraphArm hits carry the traversed edge’s
source_id(the session the fact-edge was extracted from) — unchanged by TC-31 — enablingdoc_id_ofto resolve a graph-reached entity back to a gold session id.
Before TC-31 only the GraphArm branch populated this, which left
erase_source shipping with its argument unreachable from a text or vector
hit (0.8.19 also stopped surfacing write_cursor to the SDKs, removing the
only fallback route). It stays Option<String>: a row written before 0.8.20,
or a GOVERNED row deliberately spared by the step-21 backfill under the TC-11
pin, legitimately carries NULL at rest and must read back as None rather
than a fabricated value.
The field never participates in ranking, so result order and scores are unaffected.
C-2 (0.8.19 / OPP-12 record-lifecycle Phase-1, TC-8) — the id-space of a
SearchHit::id. A closed, typed enum (NOT a magic-prefixed string) — the
C-2 binding ratified in the OPP-12 protocol:
Logical—"l:", a governed/canonical node keyed by itslogical_id(the only lifecycle-addressable space).Content—"h:", a doc-seeded/anonymous node keyed by a content hash of its body (the dominant corpus hit class).Passage—"p:", a syntheticrerank_passageshit keyed by the caller-supplied passage ordinal.
Variants§
Logical
"l:" — governed/canonical node (its logical_id).
Content
"h:" — doc-seeded/anonymous node (content hash of the body).
Passage
"p:" — synthetic rerank passage (caller-supplied ordinal).
Implementations§
Trait Implementations§
Source§impl Clone for IdSpaceKind
impl Clone for IdSpaceKind
Source§fn clone(&self) -> IdSpaceKind
fn clone(&self) -> IdSpaceKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more