Skip to content

Commit

Permalink
fix(rank): add hardcoded *100 (affecting TRC, now timesreturnedscoremul)
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksasiriski committed Nov 15, 2024
1 parent 229e7a1 commit c4e50c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/search/result/rank/score.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit c4e50c5

Please sign in to comment.