pub struct HybridConfig {
pub alpha: f32,
pub metric: DistanceMetric,
pub bm25: Bm25Config,
pub rrf_k: f32,
pub normalize: bool,
}Expand description
Hybrid search configuration
Fields§
§alpha: f32Vector search weight (0.0 to 1.0)
metric: DistanceMetricDistance metric for vector search
bm25: Bm25ConfigBM25 parameters
rrf_k: f32RRF constant (typically 60)
normalize: boolNormalize vectors
Implementations§
Source§impl HybridConfig
impl HybridConfig
Sourcepub fn vector_heavy() -> Self
pub fn vector_heavy() -> Self
Create config favoring vector search
Sourcepub fn keyword_heavy() -> Self
pub fn keyword_heavy() -> Self
Create config favoring keyword search
Trait Implementations§
Source§impl Clone for HybridConfig
impl Clone for HybridConfig
Source§fn clone(&self) -> HybridConfig
fn clone(&self) -> HybridConfig
Returns a duplicate 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 HybridConfig
impl Debug for HybridConfig
Source§impl Default for HybridConfig
impl Default for HybridConfig
Source§impl<'de> Deserialize<'de> for HybridConfig
impl<'de> Deserialize<'de> for HybridConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HybridConfig
impl RefUnwindSafe for HybridConfig
impl Send for HybridConfig
impl Sync for HybridConfig
impl Unpin for HybridConfig
impl UnwindSafe for HybridConfig
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