Announcements

Help Wizard

Step 1

NEXT STEP

The OR operator in the Search API doesn't work

The OR operator in the Search API doesn't work

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

 

 

Reply
0 Replies

Suggested posts