From 354c9caf5ad3ec0869e2c33914971749c745b273 Mon Sep 17 00:00:00 2001 From: Caleb Allen Date: Mon, 30 Mar 2026 02:53:55 -0400 Subject: [PATCH] fix: penalize substring matches (tier 2) with -5% multiplier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit '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. --- backend/explore/explore.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/explore/explore.go b/backend/explore/explore.go index b8ef282..efe5116 100644 --- a/backend/explore/explore.go +++ b/backend/explore/explore.go @@ -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% }