diff --git a/backend/explore/explore.go b/backend/explore/explore.go index 8206579..d9b8c09 100644 --- a/backend/explore/explore.go +++ b/backend/explore/explore.go @@ -740,18 +740,11 @@ func mergeIndexHits(result *MBSearchResult, hits []SearchIndexResult) { rgMBIDs[rg.MBID] = true } - recMBIDs := make(map[string]bool, len(result.Recordings)) - for _, r := range result.Recordings { - recMBIDs[r.MBID] = true - } - // Collect new entries from index. var newArtists []MBArtist var newRGs []MBReleaseGroup - var newRecs []MBRecording - for _, h := range hits { switch h.EntityType { case "artist": @@ -787,16 +780,11 @@ func mergeIndexHits(result *MBSearchResult, hits []SearchIndexResult) { } case "recording": - if !recMBIDs[h.MBID] { - newRecs = append(newRecs, MBRecording{ - MBID: h.MBID, - Title: h.Title, - ArtistCredit: h.ArtistName, - Score: scalePopularity(h.Popularity), - }) - - recMBIDs[h.MBID] = true - } + // Skip index recordings — they lack duration data and + // don't add value over MB search results which have it. + // Index artists and release groups are still merged + // because they carry popularity data the MB results lack. + continue } } @@ -808,10 +796,6 @@ func mergeIndexHits(result *MBSearchResult, hits []SearchIndexResult) { if len(newRGs) > 0 { result.ReleaseGroups = append(newRGs, result.ReleaseGroups...) } - - if len(newRecs) > 0 { - result.Recordings = append(newRecs, result.Recordings...) - } } // scalePopularity maps a raw LB listen count to a 0–100 score