pub struct NavigateSpec { /* private fields */ }Expand description
Parameters for graph-expanded vector retrieval (ADD task
ft-navigate-recall, contract v1). Maps to Moon’s
FT.NAVIGATE ... HOPS <n> [HOP_PENALTY <p>] [DECAY <λ>].
Fields are PRIVATE — validity by construction. hops is bounded to
1..=5 (Moon’s MAX_EXPAND_DEPTH); hop_penalty must be finite ≥ 0.
Note: FT.NAVIGATE DECAY has no time-weight slot (the server fixes
time_weight = 1.0); a GraphDecay carrying time_weight sends only
its λ on the navigate wire — time_weight is a GRAPH.QUERY-only knob.
Implementations§
Sourcepub const MAX_HOPS: u32 = 5
pub const MAX_HOPS: u32 = 5
Maximum hop depth Moon’s graph expansion accepts (MAX_EXPAND_DEPTH).
Sourcepub fn new(hops: u32) -> Result<NavigateSpec, StorageError>
pub fn new(hops: u32) -> Result<NavigateSpec, StorageError>
Construct with a hop depth. Accepts 1..=5 only — 0 hops is plain
vector search (use vector_search), >5 is rejected by Moon anyway.
Sourcepub fn with_hop_penalty(self, p: f64) -> Result<NavigateSpec, StorageError>
pub fn with_hop_penalty(self, p: f64) -> Result<NavigateSpec, StorageError>
Set the per-hop score penalty (server default 0.1 when unset). Accepts finite p ≥ 0 (0 ranks graph hits purely by decay/vec score).
Sourcepub fn with_decay(self, decay: GraphDecay) -> NavigateSpec
pub fn with_decay(self, decay: GraphDecay) -> NavigateSpec
Apply recency decay to the discovery edge of each graph-expanded hit.
Infallible — GraphDecay is already validated by construction.
Sourcepub fn hop_penalty(&self) -> Option<f64>
pub fn hop_penalty(&self) -> Option<f64>
The per-hop penalty, if set (finite, ≥ 0).
Sourcepub fn decay(&self) -> Option<GraphDecay>
pub fn decay(&self) -> Option<GraphDecay>
The recency decay, if set.
Trait Implementations§
Source§fn clone(&self) -> NavigateSpec
fn clone(&self) -> NavigateSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more