Skip to content

Commit 5f82433

Browse files
committed
add comment about decay range
1 parent e4d6992 commit 5f82433

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/segment/src/index/query_optimization/rescore_formula/formula_scorer.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ impl FormulaScorer<'_> {
253253
DecayKind::Gauss => gauss_decay(x, target, *lambda),
254254
DecayKind::Lin => linear_decay(x, target, *lambda),
255255
};
256+
257+
// All decay functions have a range of [0, 1], no need to check for bounds
256258
Ok(decay)
257259
}
258260
}

0 commit comments

Comments
 (0)