pub enum FusionStrategy {
Rrf {
k: usize,
},
Weighted {
weights: Vec<f64>,
},
Union,
VectorOnly,
}Expand description
Strategy for fusing ranked result lists from multiple retrieval sources.
Variants§
Rrf
Reciprocal Rank Fusion. Uses only ranks; robust to different score scales.
Weighted
Weighted linear combination. Min-max normalizes each source to [0,1] first. Weights are normalized to sum to 1.0; negatives clamped to 0; all-zero falls back to equal.
Union
Take all hits; keep the max score per entity_id.
VectorOnly
Drop text hits; return vector hits only.
Trait Implementations§
Source§impl Clone for FusionStrategy
impl Clone for FusionStrategy
Source§fn clone(&self) -> FusionStrategy
fn clone(&self) -> FusionStrategy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FusionStrategy
impl Debug for FusionStrategy
Source§impl Default for FusionStrategy
impl Default for FusionStrategy
Source§impl<'de> Deserialize<'de> for FusionStrategy
impl<'de> Deserialize<'de> for FusionStrategy
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
Source§impl PartialEq for FusionStrategy
impl PartialEq for FusionStrategy
Source§fn eq(&self, other: &FusionStrategy) -> bool
fn eq(&self, other: &FusionStrategy) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for FusionStrategy
impl Serialize for FusionStrategy
impl StructuralPartialEq for FusionStrategy
Auto Trait Implementations§
impl Freeze for FusionStrategy
impl RefUnwindSafe for FusionStrategy
impl Send for FusionStrategy
impl Sync for FusionStrategy
impl Unpin for FusionStrategy
impl UnsafeUnpin for FusionStrategy
impl UnwindSafe for FusionStrategy
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