pub struct HybridSearch { /* private fields */ }
Expand description
A hybrid search strategy that combines a similarity search with a keyword search / sparse search.
Defaults to a a maximum of 10 documents and EmbeddedField::Combined
for the field(s).
Implementations§
Source§impl HybridSearch
impl HybridSearch
Sourcepub fn with_top_k(&mut self, top_k: u64) -> &mut Self
pub fn with_top_k(&mut self, top_k: u64) -> &mut Self
Sets the maximum amount of total documents retrieved
Sourcepub fn with_top_n(&mut self, top_n: u64) -> &mut Self
pub fn with_top_n(&mut self, top_n: u64) -> &mut Self
Sets the maximum amount of documents to be retrieved per individual query
Sourcepub fn with_dense_vector_field(
&mut self,
dense_vector_field: impl Into<EmbeddedField>,
) -> &mut Self
pub fn with_dense_vector_field( &mut self, dense_vector_field: impl Into<EmbeddedField>, ) -> &mut Self
Sets the vector field for the dense vector
Defaults to EmbeddedField::Combined
Sourcepub fn dense_vector_field(&self) -> &EmbeddedField
pub fn dense_vector_field(&self) -> &EmbeddedField
Returns the field for the dense vector
Sourcepub fn with_sparse_vector_field(
&mut self,
sparse_vector_field: impl Into<EmbeddedField>,
) -> &mut Self
pub fn with_sparse_vector_field( &mut self, sparse_vector_field: impl Into<EmbeddedField>, ) -> &mut Self
Sets the vector field for the sparse vector (if applicable)
Defaults to EmbeddedField::Combined
Sourcepub fn sparse_vector_field(&self) -> &EmbeddedField
pub fn sparse_vector_field(&self) -> &EmbeddedField
Returns the field for the dense vector
Trait Implementations§
Source§impl Clone for HybridSearch
impl Clone for HybridSearch
Source§fn clone(&self) -> HybridSearch
fn clone(&self) -> HybridSearch
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for HybridSearch
impl Debug for HybridSearch
Source§impl Default for HybridSearch
impl Default for HybridSearch
impl SearchStrategy for HybridSearch
Auto Trait Implementations§
impl Freeze for HybridSearch
impl RefUnwindSafe for HybridSearch
impl Send for HybridSearch
impl Sync for HybridSearch
impl Unpin for HybridSearch
impl UnwindSafe for HybridSearch
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> 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> 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