pub struct DiskSearchStrategy<'a, Data, ProviderFactory>{ /* private fields */ }Expand description
The search strategy for the disk provider. This is used to create the search accessor for use in search in quant space and post_process function to reorder with full precision vectors.
§Why vertex_provider_factory and scratch_pool are here instead of DiskProvider
The DataProvider trait requires ’static bounds for multi-threaded async contexts, but vertex_provider_factory may have non-’static lifetime bounds (e.g., borrowing from local data structures). Moving these components to the search strategy allows DiskProvider to satisfy ’static constraints while enabling flexible per-search resource management.
Trait Implementations§
Source§impl<'this, Data, ProviderFactory> SearchStrategy<DiskProvider<Data>, [<Data as GraphDataType>::VectorDataType], (<DiskProvider<Data> as DataProvider>::InternalId, <Data as GraphDataType>::AssociatedDataType)> for DiskSearchStrategy<'this, Data, ProviderFactory>
impl<'this, Data, ProviderFactory> SearchStrategy<DiskProvider<Data>, [<Data as GraphDataType>::VectorDataType], (<DiskProvider<Data> as DataProvider>::InternalId, <Data as GraphDataType>::AssociatedDataType)> for DiskSearchStrategy<'this, Data, ProviderFactory>
Source§type QueryComputer = DiskQueryComputer
type QueryComputer = DiskQueryComputer
The computer used by the associated accessor. Read more
Source§type SearchAccessor<'a> = DiskAccessor<'a, Data, <ProviderFactory as VertexProviderFactory<Data>>::VertexProviderType>
type SearchAccessor<'a> = DiskAccessor<'a, Data, <ProviderFactory as VertexProviderFactory<Data>>::VertexProviderType>
The concrete type of the accessor that is used to access
Self during the greedy
graph search. The query will be provided to the accessor exactly once during search
to construct the query computer.Source§type SearchAccessorError = ANNError
type SearchAccessorError = ANNError
An error that can occur when getting a search_accessor.
Source§type PostProcessor = RerankAndFilter<'this>
type PostProcessor = RerankAndFilter<'this>
The associated
SearchPostProcessor for the final results.Source§fn search_accessor<'a>(
&'a self,
provider: &'a DiskProvider<Data>,
_context: &DefaultContext,
) -> Result<Self::SearchAccessor<'a>, Self::SearchAccessorError>
fn search_accessor<'a>( &'a self, provider: &'a DiskProvider<Data>, _context: &DefaultContext, ) -> Result<Self::SearchAccessor<'a>, Self::SearchAccessorError>
Construct and return the search accessor.
Source§fn post_processor(&self) -> Self::PostProcessor
fn post_processor(&self) -> Self::PostProcessor
Construct the
SearchPostProcess struct to post-process the results of search and
store them into the output container.Auto Trait Implementations§
impl<'a, Data, ProviderFactory> !Freeze for DiskSearchStrategy<'a, Data, ProviderFactory>
impl<'a, Data, ProviderFactory> !RefUnwindSafe for DiskSearchStrategy<'a, Data, ProviderFactory>
impl<'a, Data, ProviderFactory> Send for DiskSearchStrategy<'a, Data, ProviderFactory>
impl<'a, Data, ProviderFactory> Sync for DiskSearchStrategy<'a, Data, ProviderFactory>
impl<'a, Data, ProviderFactory> Unpin for DiskSearchStrategy<'a, Data, ProviderFactory>
impl<'a, Data, ProviderFactory> UnsafeUnpin for DiskSearchStrategy<'a, Data, ProviderFactory>
impl<'a, Data, ProviderFactory> !UnwindSafe for DiskSearchStrategy<'a, Data, ProviderFactory>
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
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>
Converts
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>
Converts
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