fix(deezer): use free text for singleton searches - #6895
Open
pszpetkowski wants to merge 1 commit into
Open
Conversation
Singleton searches built the query as `<title> artist:"<artist>"`. Deezer discards unquoted free text as soon as a query contains any field:"value" filter, so that was evaluated as `artist:"<artist>"` alone - every track by the artist, in Deezer's own relevance order, truncated to `search_limit` (default 5). Substituting nonsense for the title returns a byte-identical result set. For any artist with more releases than that window, the track being imported was simply never among the candidates offered. Filtering on the title as well (`track:"<title>" artist:"<artist>"`) is not a fix: `artist:` matches loosely enough to return unrelated artists, so the two filters can intersect to nothing even for a correctly tagged file. `track:"Get Lucky" artist:"Daft Punk"` returns zero results, while the plain free text `Get Lucky Daft Punk` returns the right track first. Measured over 12 tracks at the default `search_limit`, counting the wanted track appearing anywhere in the results: `<title> artist:"..."` 6/12, mean rank 1.50 `track:"..." artist:"..."` 7/12, mean rank 1.00 free text 10/12, mean rank 1.00 Album searches are unchanged; `album:"<name>"` has no equivalent problem. Adds test/plugins/test_deezer.py, which did not exist.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6895 +/- ##
==========================================
+ Coverage 75.61% 75.63% +0.02%
==========================================
Files 163 163
Lines 21323 21325 +2
Branches 3363 3364 +1
==========================================
+ Hits 16124 16130 +6
+ Misses 4406 4402 -4
Partials 793 793
🚀 New features to boost your workflow:
|
semohr
reviewed
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Singleton searches built the query as
<title> artist:"<artist>". Deezer discards unquoted free text as soon as a query contains any field:"value" filter, so that was evaluated asartist:"<artist>"alone - every track by the artist, in Deezer's own relevance order, truncated tosearch_limit(default 5). Substituting nonsense for the title returns a byte-identical result set. For any artist with more releases than that window, the track being imported was simply never among the candidates offered.Filtering on the title as well (
track:"<title>" artist:"<artist>") is not a fix:artist:matches loosely enough to return unrelated artists, so the two filters can intersect to nothing even for a correctly tagged file.track:"Get Lucky" artist:"Daft Punk"returns zero results, while the plain free textGet Lucky Daft Punkreturns the right track first.Measured over 12 tracks at the default
search_limit, counting the wanted track appearing anywhere in the results:Album searches are unchanged;
album:"<name>"has no equivalent problem.Adds test/plugins/test_deezer.py, which did not exist.
docs/to describe it.)docs/changelog.rstto the bottom of one of the lists near the top of the document.)