pub struct GroundIndex { /* private fields */ }Expand description
Precomputed, graph-invariant inputs to grounding — the per-node BM25F token fields and
lowercased titles. Built ONCE per graph via GroundIndex::build; grounding many queries against
one graph reuses it instead of rebuilding it every call.
Implementations§
Source§impl GroundIndex
impl GroundIndex
Sourcepub fn build(graph: &Graph) -> Self
pub fn build(graph: &Graph) -> Self
Precompute the ground inputs for graph with the FROZEN ranker calibration (one O(N) pass).
Sourcepub fn build_with_config(graph: &Graph, config: RankerConfig) -> Self
pub fn build_with_config(graph: &Graph, config: RankerConfig) -> Self
Precompute the ground inputs with an explicit RankerConfig — the injection seam for the
dev-only parameter sweep. Production/eval callers use GroundIndex::build (frozen).
Sourcepub fn candidates(&self, terms: &[String]) -> Option<Vec<usize>>
pub fn candidates(&self, terms: &[String]) -> Option<Vec<usize>>
Narrow the candidate set using the trigram index.
Returns None if narrowing isn’t possible (short terms) — caller falls back to scanning all.
Returns Some(indices) — the node indices that MIGHT match (superset; final scoring decides).
Trait Implementations§
Source§impl Clone for GroundIndex
impl Clone for GroundIndex
Source§fn clone(&self) -> GroundIndex
fn clone(&self) -> GroundIndex
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GroundIndex
impl RefUnwindSafe for GroundIndex
impl Send for GroundIndex
impl Sync for GroundIndex
impl Unpin for GroundIndex
impl UnsafeUnpin for GroundIndex
impl UnwindSafe for GroundIndex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more