pub struct Ranker<'a> { /* private fields */ }Implementations§
Source§impl<'a> Ranker<'a>
impl<'a> Ranker<'a>
pub fn new(engine: &'a Engine<'a>) -> Self
Sourcepub fn pagerank_global(&self) -> Result<Vec<(String, f64)>>
pub fn pagerank_global(&self) -> Result<Vec<(String, f64)>>
Raw global PageRank vector: (node_id, score) over the full heterogeneous universe, id-sorted. No projection, no blending.
Sourcepub fn pagerank_global_with(
&self,
contributors: &[EdgeWeightFn],
) -> Result<Vec<(String, f64)>>
pub fn pagerank_global_with( &self, contributors: &[EdgeWeightFn], ) -> Result<Vec<(String, f64)>>
Global vector with edge-weight contributors applied.
Sourcepub fn pagerank_task(&self, goal: &str) -> Result<Vec<(String, f64)>>
pub fn pagerank_task(&self, goal: &str) -> Result<Vec<(String, f64)>>
Raw task-personalized PPR vector for goal.
Sourcepub fn pagerank_task_with(
&self,
goal: &str,
contributors: &[EdgeWeightFn],
) -> Result<Vec<(String, f64)>>
pub fn pagerank_task_with( &self, goal: &str, contributors: &[EdgeWeightFn], ) -> Result<Vec<(String, f64)>>
Task vector with edge-weight contributors applied.
Sourcepub fn candidates(&self, goal: &str, limit: usize) -> Result<Vec<ScoredEntity>>
pub fn candidates(&self, goal: &str, limit: usize) -> Result<Vec<ScoredEntity>>
Lexical candidate generation for goal (stage 1).
Sourcepub fn candidates_with(
&self,
goal: &str,
limit: usize,
hooks: &RankHooks,
) -> Result<Vec<ScoredEntity>>
pub fn candidates_with( &self, goal: &str, limit: usize, hooks: &RankHooks, ) -> Result<Vec<ScoredEntity>>
Candidates with explicit plugin providers (one call, deterministic
order). Provider rows merge by canonical id: max score wins, the
provider reason is tagged plugin:<id> for explainability.
Sourcepub fn symbols(&self, req: &RankRequest) -> Result<RankResult>
pub fn symbols(&self, req: &RankRequest) -> Result<RankResult>
Full task/global blend per symbol with feature decomposition. Same math as build_surface (no MMR/quotas/budget — pure ranking). Plugin seed/feature/rerank hooks apply here and are recorded.
Sourcepub fn symbols_with_hooks(
&self,
req: &RankRequest,
hooks: &RankHooks,
) -> Result<RankResult>
pub fn symbols_with_hooks( &self, req: &RankRequest, hooks: &RankHooks, ) -> Result<RankResult>
symbols() with explicit plugin hooks (one call, deterministic order).
Derivation shares the pipeline’s inputs BY CONSTRUCTION: per-entry
confidence, required set, seed membership, and lexical scores come
from the compiled surface map and its helpers — the same values
build_surface blends. Per-symbol totals take the max over that
symbol’s entries (overloads); blends are otherwise identical math.