pub struct InMemoryHybridExecutor { /* private fields */ }Expand description
In-memory hybrid executor for testing
Implementations§
Source§impl InMemoryHybridExecutor
impl InMemoryHybridExecutor
Sourcepub fn new() -> InMemoryHybridExecutor
pub fn new() -> InMemoryHybridExecutor
Create a new in-memory hybrid executor
Sourcepub fn add_vector(
&mut self,
collection: &str,
id: u64,
vector: Vec<f32>,
linked_record_id: Option<u64>,
)
pub fn add_vector( &mut self, collection: &str, id: u64, vector: Vec<f32>, linked_record_id: Option<u64>, )
Add a vector with optional link to record
Sourcepub fn execute_with_fusion(
&self,
structured_ids: &[u64],
vector_query: &VectorQuery,
fusion: &FusionStrategy,
) -> Result<UnifiedResult, ExecutionError>
pub fn execute_with_fusion( &self, structured_ids: &[u64], vector_query: &VectorQuery, fusion: &FusionStrategy, ) -> Result<UnifiedResult, ExecutionError>
Execute a hybrid query with manual fusion
Trait Implementations§
Source§impl Default for InMemoryHybridExecutor
impl Default for InMemoryHybridExecutor
Source§fn default() -> InMemoryHybridExecutor
fn default() -> InMemoryHybridExecutor
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Forget for InMemoryHybridExecutor
impl Freeze for InMemoryHybridExecutorwhere
*const u8 is !null: Freeze,
PhantomData<(u64, UnifiedRecord)>: Freeze,
PhantomData<((String, u64), Vec<f32>)>: Freeze,
PhantomData<((String, u64), HashMap<String, MetadataValue>)>: Freeze,
PhantomData<(String, HnswIndex)>: Freeze,
*const ArcInner<UnifiedIndex> is !null: Freeze,
PhantomData<ArcInner<UnifiedIndex>>: Freeze,
impl Move for InMemoryHybridExecutor
impl RefUnwindSafe for InMemoryHybridExecutorwhere
Atomic<usize>: RefUnwindSafe,
Atomic<u64>: RefUnwindSafe,
RwLock<HashMap<String, Vec<VectorKey>>>: RefUnwindSafe,
RwLock<HashMap<VectorKey, String>>: RefUnwindSafe,
RwLock<HashMap<String, Vec<RowKey>>>: RefUnwindSafe,
RwLock<HashMap<RowKey, String>>: RefUnwindSafe,
RwLock<HashMap<String, (String, String)>>: RefUnwindSafe,
RwLock<HashMap<VectorKey, RowKey>>: RefUnwindSafe,
RwLock<HashMap<RowKey, Vec<VectorKey>>>: RefUnwindSafe,
impl Send for InMemoryHybridExecutor
impl Sync for InMemoryHybridExecutor
impl Unpin for InMemoryHybridExecutor
impl UnsafeUnpin for InMemoryHybridExecutorwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<(u64, UnifiedRecord)>: UnsafeUnpin,
PhantomData<((String, u64), Vec<f32>)>: UnsafeUnpin,
PhantomData<((String, u64), HashMap<String, MetadataValue>)>: UnsafeUnpin,
PhantomData<(String, HnswIndex)>: UnsafeUnpin,
*const ArcInner<UnifiedIndex> is !null: UnsafeUnpin,
PhantomData<ArcInner<UnifiedIndex>>: UnsafeUnpin,
impl UnwindSafe for InMemoryHybridExecutorwhere
HashMap<u64, UnifiedRecord>: UnwindSafe,
HashMap<(String, u64), Vec<f32>>: UnwindSafe,
HashMap<(String, u64), HashMap<String, MetadataValue>>: UnwindSafe,
HashMap<String, HnswIndex>: UnwindSafe,
Arc<UnifiedIndex>: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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 moreSource§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>
Wrap the input message
T in a tonic::Request