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> DefaultPostProcessor<'this, DiskProvider<Data>, &'this [<Data as GraphDataType>::VectorDataType], (<DiskProvider<Data> as DataProvider>::InternalId, <Data as GraphDataType>::AssociatedDataType)> for DiskSearchStrategy<'this, Data, ProviderFactory>
impl<'this, Data, ProviderFactory> DefaultPostProcessor<'this, DiskProvider<Data>, &'this [<Data as GraphDataType>::VectorDataType], (<DiskProvider<Data> as DataProvider>::InternalId, <Data as GraphDataType>::AssociatedDataType)> for DiskSearchStrategy<'this, Data, ProviderFactory>
Source§type Processor = RerankAndFilter<'this>
type Processor = RerankAndFilter<'this>
The default post-processor type.
Source§fn default_post_processor(&'this self) -> Self::Processor
fn default_post_processor(&'this self) -> Self::Processor
Create the default post-processor.
Source§impl<'this, Data, ProviderFactory> SearchStrategy<'this, DiskProvider<Data>, &'this [<Data as GraphDataType>::VectorDataType]> for DiskSearchStrategy<'this, Data, ProviderFactory>
impl<'this, Data, ProviderFactory> SearchStrategy<'this, DiskProvider<Data>, &'this [<Data as GraphDataType>::VectorDataType]> for DiskSearchStrategy<'this, Data, ProviderFactory>
Source§type SearchAccessor = DiskAccessor<'this, Data, <ProviderFactory as VertexProviderFactory<Data>>::VertexProviderType>
type SearchAccessor = DiskAccessor<'this, 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§fn search_accessor(
&'this self,
provider: &'this DiskProvider<Data>,
_context: &DefaultContext,
query: &'this [Data::VectorDataType],
) -> Result<Self::SearchAccessor, Self::SearchAccessorError>
fn search_accessor( &'this self, provider: &'this DiskProvider<Data>, _context: &DefaultContext, query: &'this [Data::VectorDataType], ) -> Result<Self::SearchAccessor, Self::SearchAccessorError>
Construct and return the search accessor.
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> !UnwindSafe 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>
Blanket Implementations§
impl<T> AsyncFriendly 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
impl<'a, S, Provider, T, O> DefaultSearchStrategy<'a, Provider, T, O> for Swhere
S: SearchStrategy<'a, Provider, T> + DefaultPostProcessor<'a, Provider, T, O>,
Provider: DataProvider,
O: Send,
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