fix: penalize substring matches (tier 2) with -5% multiplier
'Del Shannon' was ranking above 'Shannon and the Clams' because tier 2 (substring) had a neutral ×1.0 multiplier. Del Shannon's MB score of 100 (Lucene considers 'Shannon' a full word match) plus 588K listens gave him a base score of 98 — nearly untouchable. Tier 2 now gets -5%, dropping Del Shannon to 93 while starts-with matches like Shannon Wright (99) and Shannon and the Clams (90) maintain their advantage. The logic: when the user types 'shannon', results where 'shannon' starts the name are more likely what they want than results where it's buried in the middle.
This commit is contained in:
@@ -911,7 +911,7 @@ const (
|
||||
var tierBonus = map[int]float64{
|
||||
0: 0.15, // exact match: +15%
|
||||
1: 0.08, // starts with: +8%
|
||||
2: 0.0, // substring: no change
|
||||
2: -0.05, // substring (query buried in name): -5%
|
||||
3: -0.15, // no substring match: -15%
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user