pub struct HybridSearchEngine<V, L> { /* private fields */ }Expand description
A combined vector + lexical search engine
Implementations§
Source§impl<V, L> HybridSearchEngine<V, L>where
V: VectorSearchBackend,
L: LexicalSearchBackend,
impl<V, L> HybridSearchEngine<V, L>where
V: VectorSearchBackend,
L: LexicalSearchBackend,
Sourcepub fn with_fusion_config(self, config: RRFConfig) -> Self
pub fn with_fusion_config(self, config: RRFConfig) -> Self
Set fusion configuration
Sourcepub fn with_overfetch(self, factor: f32) -> Self
pub fn with_overfetch(self, factor: f32) -> Self
Set over-fetch factor
Sourcepub fn search(
&self,
vector_query: Option<&[f32]>,
text_query: Option<&str>,
limit: usize,
) -> Vec<SearchResult>
pub fn search( &self, vector_query: Option<&[f32]>, text_query: Option<&str>, limit: usize, ) -> Vec<SearchResult>
Perform hybrid search
Sourcepub fn search_detailed(
&self,
vector_query: Option<&[f32]>,
text_query: Option<&str>,
limit: usize,
) -> Vec<SearchResult>
pub fn search_detailed( &self, vector_query: Option<&[f32]>, text_query: Option<&str>, limit: usize, ) -> Vec<SearchResult>
Perform hybrid search with detailed scores
Auto Trait Implementations§
impl<V, L> Freeze for HybridSearchEngine<V, L>
impl<V, L> RefUnwindSafe for HybridSearchEngine<V, L>where
V: RefUnwindSafe,
L: RefUnwindSafe,
impl<V, L> Send for HybridSearchEngine<V, L>
impl<V, L> Sync for HybridSearchEngine<V, L>
impl<V, L> Unpin for HybridSearchEngine<V, L>
impl<V, L> UnsafeUnpin for HybridSearchEngine<V, L>where
V: UnsafeUnpin,
L: UnsafeUnpin,
impl<V, L> UnwindSafe for HybridSearchEngine<V, L>where
V: UnwindSafe,
L: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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