pub struct RetrieveOptions {
pub k: usize,
pub hops: u8,
pub max_distance: f32,
pub max_nodes: Option<usize>,
}Expand description
Options for retrieve_with.
Fields§
§k: usizeNumber of seed nodes returned by the vector search.
hops: u8BFS expansion depth from each seed node.
max_distance: f32Maximum cosine distance for a vector hit to qualify as a seed.
Hits with distance > max_distance are dropped before BFS expansion.
Default: f32::MAX (keep all k hits).
max_nodes: Option<usize>Hard cap on the total number of nodes in the returned subgraph.
BFS stops as soon as this limit is reached.
None means no cap.
Trait Implementations§
Source§impl Default for RetrieveOptions
impl Default for RetrieveOptions
Source§fn default() -> RetrieveOptions
fn default() -> RetrieveOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RetrieveOptions
impl RefUnwindSafe for RetrieveOptions
impl Send for RetrieveOptions
impl Sync for RetrieveOptions
impl Unpin for RetrieveOptions
impl UnsafeUnpin for RetrieveOptions
impl UnwindSafe for RetrieveOptions
Blanket Implementations§
impl<T> Allocation for T
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
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, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
Invokes
WrappingSpan::make_wrapped to wrap an AST node in a span.