API: Search results miss studio albums when compilations are excluded

Hi all,

I’ve been using Picard, SongKong and other taggers for a while and currently play a bit with the webservice. Concrete, I’m trying to find the first release of a song using artist and recording title. However, the results are a bit confusing as studio albums are missing as soon as compilations are excluded. The same results are returned when using the enhanced web search. So far I checked Google, this board, and the API and search documentation, but I wasn’t able to find a reason for that behaviour, or what I’m doing wrong.

Below samples use the track “Sit down” from “James” and the enhanced web search. The web service returns the same results.

artist:“James” AND recording:“sit down” AND primarytype:(“Album” OR “Single”) NOT secondarytype:*

Above query returns a couple of singles and albums. One of them is “Gold Mother”, but the song is “Sit Down (live, G-Mex)”, shown as track 15. On the same album you can actually find the song as track number 7, but it is not included in the results.

Excluding only compilations, still doesn’t show the entry:

artist:“James” AND recording:“sit down” AND primarytype:(“Album” OR “Single”) NOT secondarytype:compilation

Removing the exclusion of secondarytype then includes the release I’m looking for:

artist:“James” AND recording:“sit down” AND primarytype:(“Album” OR “Single”)

Interestingly, the “type” of the entry is shown as “Album”, so what’s the reason that it is only listed in the results if compilations are not excluded?

This is not a single case. There is the same issue when you look for “Where the streets have no name” by “U2”. The studio version - track 1 on The Joshua Tree - with a length of 5:38 is not listed. It mainly returns live versions.

artist:“U2” AND recording:“where the streets have no name” AND primarytype:(“Album” OR “Single”) NOT secondarytype:*

If you remove the exclusion of the secondarytype, the studio version is one of the first results:

artist:“U2” AND recording:“where the streets have no name” AND primarytype:(“Album” OR “Single”)

Is there a reason for this behaviour? What am I doing wrong?

Thanks for your help!

Hi Salibor,

It is actually the “type” of the release group the entry, which is a recording, appears in as a track.

When you exclude compilations, you actually exclude every recording which appears as a track in a compilation release (group). That is why you are missing every studio recording which appears in compilation too.

It allows to find every recording that does NOT appear in any compilation.

Nothing wrong. I’m afraid the search syntax just doesn’t allow for your exact query. You have to remove the exclusion and filter results on your own, at least for now. Edit: reported as SOLR-100.

1 Like

Hy yvanzo,

Got it! I’ll keep that in mind when I tweak my queries.

I implemented that logic and it works for me. Thank you for your explanation and for raising a ticket.