Skip to main content

weighted_fuse

Function weighted_fuse 

Source
pub fn weighted_fuse(
    vector: &[ScoredHit],
    fulltext: &[ScoredHit],
    alpha: f32,
    limit: usize,
) -> Vec<FusedHit>
Expand description

Fuse one vector list with one fulltext list by weighted sum.

Each list is min-max normalized into 0..=1 before combining as alpha * vector + (1 - alpha) * fulltext. Degenerate lists where all scores are equal normalize to 1.0 so presence still counts.