pub enum FusionMethod {
Rrf {
k: f32,
},
NormalizedWeightedSum,
}Expand description
Method for fusing multiple ranked result lists.
Variants§
Rrf
Reciprocal Rank Fusion: score(d) = Σ_i w_i / (k + rank_i(d)).
Rank-based, so it is insensitive to incompatible score scales
(BM25 vs cosine similarity). k dampens the impact of top ranks;
60 is the standard value.
NormalizedWeightedSum
Weighted sum of min-max normalized scores:
score(d) = Σ_i w_i * (s_i(d) - min_i) / (max_i - min_i).
Score-based, preserves score gaps within each list. Sensitive to outliers; prefer RRF unless the score distributions are known.
Degenerate lists where every score is identical (including
single-result lists) have no min-max range; every document in such a
list contributes the full weight, as if tied at the top. Avoid
feeding filter-like subqueries (many docs, constant score) through
this method — use Rrf, which only depends on ranks.
Trait Implementations§
Source§impl Clone for FusionMethod
impl Clone for FusionMethod
Source§fn clone(&self) -> FusionMethod
fn clone(&self) -> FusionMethod
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for FusionMethod
Source§impl Debug for FusionMethod
impl Debug for FusionMethod
Source§impl Default for FusionMethod
impl Default for FusionMethod
Source§impl PartialEq for FusionMethod
impl PartialEq for FusionMethod
Source§fn eq(&self, other: &FusionMethod) -> bool
fn eq(&self, other: &FusionMethod) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FusionMethod
Auto Trait Implementations§
impl Freeze for FusionMethod
impl RefUnwindSafe for FusionMethod
impl Send for FusionMethod
impl Sync for FusionMethod
impl Unpin for FusionMethod
impl UnsafeUnpin for FusionMethod
impl UnwindSafe for FusionMethod
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
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> 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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.