pub struct RRFConfig {
pub k: f32,
pub vector_weight: f32,
pub lexical_weight: f32,
}Expand description
Configuration for Reciprocal Rank Fusion
Fields§
§k: f32RRF k parameter (typically 60) Higher values give more weight to lower-ranked results
vector_weight: f32Weight for vector search results
lexical_weight: f32Weight for lexical search results
Implementations§
Source§impl RRFConfig
impl RRFConfig
Sourcepub fn with_weights(vector_weight: f32, lexical_weight: f32) -> Self
pub fn with_weights(vector_weight: f32, lexical_weight: f32) -> Self
Create with custom weights
Sourcepub fn semantic_focused() -> Self
pub fn semantic_focused() -> Self
Emphasize vector search (semantic)
Sourcepub fn keyword_focused() -> Self
pub fn keyword_focused() -> Self
Emphasize lexical search (keyword)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RRFConfig
impl RefUnwindSafe for RRFConfig
impl Send for RRFConfig
impl Sync for RRFConfig
impl Unpin for RRFConfig
impl UnsafeUnpin for RRFConfig
impl UnwindSafe for RRFConfig
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> 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