Announcements
Hi folks! We're aware of reports about your Wrapped stories misbehaving and we're looking into it. We've managed to fix the issue with the Wrapped banner/stories not showing up. More info here. If the stories cause your app to stop responding, please subscribe here. Also, check out our Wrapped FAQ for answers to common questions.

The OR operator in the Search API doesn't work

Reply
Highlighted

The OR operator in the Search API doesn't work

Regular

I'm trying to look for tracks by either ISRC ID, or by both track name and artist name, I try to do so in a single request using the OR operator in the search API endpoint but it doesn't really work.

 

When I search by ISRC ID alone it works

 

/search?type=track&q=isrc:USWB11101940

 

 

When I search by both track name and artist name it also works

 

/search?type=track&q=track:adventure artist:red hot chili peppers

 

 

But when I try to search by ISRC ID or by track name and artist name in the same query it doesn't really work, I mean when I provide a valid and existing ISRC ID AND a valid and existing track and artist names it works:

 

/search?type=track&q=isrc:USWB11101940 OR track:adventure artist:red hot chili peppers

 

But when I intentionally provide either a non-existing ISRC ID OR a none-existing track and artist names it doesn't fallback to the other side of the "OR" operator and it doesn't provide results even though it should.

 

Examples of the possible bug:

Valid and existing ISRC ID or none-existing track and artist names - no results (it fails on the track & artist names and it doesn't fallback to the ISRC ID)

 

/search?type=track&q=isrc:USWB11101940 OR track:adve1nture artist:r1ed h1ot chi1li pep1pe1rs

 

Non-existing ISRC ID or valid and existing track and artist names - no results (it fails on the ISRC ID and doesn't fallback to the track & artist names)

 

/search?type=track&q=isrc:11WB11101940 OR track:adventure artist:red hot chili peppers

 

 

SUGGESTED POSTS