From 5992c776cb2efc4162129cf26dc8357ccfced179 Mon Sep 17 00:00:00 2001 From: Aditi Ahuja Date: Mon, 6 Jan 2025 10:35:20 +0530 Subject: [PATCH] modified weight for knn scorer --- search/scorer/scorer_knn.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/search/scorer/scorer_knn.go b/search/scorer/scorer_knn.go index 2f832efab..8e8681b39 100644 --- a/search/scorer/scorer_knn.go +++ b/search/scorer/scorer_knn.go @@ -128,7 +128,9 @@ func (sqs *KNNQueryScorer) Score(ctx *search.SearchContext, } func (sqs *KNNQueryScorer) Weight() float64 { - return sqs.queryBoost * sqs.queryBoost + // return sqs.queryBoost * sqs.queryBoost + // gets multiplied by boost down the line + return 1.0 } func (sqs *KNNQueryScorer) SetQueryNorm(qnorm float64) {