Skip to content

web search done right

limit should have been 0.0 in 'score_rank' as the scores are not reversed

Mikkel Denker51e47107b2cc
diff --git a/crates/core/src/ranking/signal/non_text.rs b/crates/core/src/ranking/signal/non_text.rs
index 92cfe930..dc9826c8 100644
--- a/crates/core/src/ranking/signal/non_text.rs
+++ b/crates/core/src/ranking/signal/non_text.rs
@@ -46,7 +46,7 @@ fn score_rank(rank: f64) -> f64 {
const NUM_GROUPS: f64 = 10.0;
const BASE: f64 = 8.0;
- (NUM_GROUPS - (1.0 + rank).log(BASE)).max(NUM_GROUPS)
+ (NUM_GROUPS - (1.0 + rank).log(BASE)).max(0.0)
}
#[inline]