pub struct FilteredVectorSearch { /* private fields */ }Expand description
A vector search restricted to the nodes a traversal reaches (§5.3).
Mirrors TraversalBuilder, which is the crate’s established shape for a
read with options. The strategy is chosen by the planner and not by the
caller: D-007’s whole content is that the choice is arithmetic, and a
parameter that lets a caller get it wrong would be a fidelity leak of the
kind Doctrine VIII names. Self::strategy exists to force a strategy in
tests — above all in the test that requires the two to agree.
Implementations§
Source§impl FilteredVectorSearch
impl FilteredVectorSearch
pub fn new( model: ModelName, query: Vec<f32>, traversal: TraversalBuilder, ) -> Self
pub fn top_k(self, k: usize) -> Self
pub fn byte_budget(self, budget: usize) -> Self
pub fn probe_cap(self, cap: usize) -> Self
Sourcepub fn strategy(self, strategy: VectorFilterStrategy) -> Self
pub fn strategy(self, strategy: VectorFilterStrategy) -> Self
Force a strategy, bypassing the planner. For tests and diagnosis.
Sourcepub async fn execute_explained(
&self,
conn: &Connection,
now_ts: &str,
) -> Result<(Vec<VectorSearchResult>, CostEstimate)>
pub async fn execute_explained( &self, conn: &Connection, now_ts: &str, ) -> Result<(Vec<VectorSearchResult>, CostEstimate)>
Run the search, returning results and the plan that produced them.
The estimate comes back so a caller can log it against reality, which is
D-007’s empirical-tuning requirement. execute is the same call with the
plan dropped.
Sourcepub async fn execute(
&self,
conn: &Connection,
now_ts: &str,
) -> Result<Vec<VectorSearchResult>>
pub async fn execute( &self, conn: &Connection, now_ts: &str, ) -> Result<Vec<VectorSearchResult>>
Run the search (§5.3).
Trait Implementations§
Source§impl Clone for FilteredVectorSearch
impl Clone for FilteredVectorSearch
Source§fn clone(&self) -> FilteredVectorSearch
fn clone(&self) -> FilteredVectorSearch
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§
impl Freeze for FilteredVectorSearch
impl RefUnwindSafe for FilteredVectorSearch
impl Send for FilteredVectorSearch
impl Sync for FilteredVectorSearch
impl Unpin for FilteredVectorSearch
impl UnsafeUnpin for FilteredVectorSearch
impl UnwindSafe for FilteredVectorSearch
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request