From c4e50c55a2dc988125cf9817b9a09a19faf52892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksa=20Siri=C5=A1ki?= <31509435+aleksasiriski@users.noreply.github.com> Date: Fri, 15 Nov 2024 23:45:13 +0100 Subject: [PATCH] fix(rank): add hardcoded *100 (affecting TRC, now timesreturnedscoremul) --- src/search/result/rank/score.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search/result/rank/score.go b/src/search/result/rank/score.go index a79c0fbf..1b1bfe6a 100644 --- a/src/search/result/rank/score.go +++ b/src/search/result/rank/score.go @@ -37,7 +37,7 @@ func calculateScore[T ranker](val scoreEngineRanker[T], rconf category.Ranking) // Calculate a second score based on the number of times the result was returned. // Log is used to make the score less sensitive to the number of times returned. - timesReturnedScore := math.Log(float64(len(val.EngineRanks()))*rconf.TimesReturnedMul+rconf.TimesReturnedAdd)*rconf.TimesReturnedScoreMul + rconf.TimesReturnedScoreAdd + timesReturnedScore := math.Log(float64(len(val.EngineRanks()))*rconf.TimesReturnedMul+rconf.TimesReturnedAdd)*100*rconf.TimesReturnedScoreMul + rconf.TimesReturnedScoreAdd return rankScoreAvg + timesReturnedScore }