title: Grouping operators in Spotify advanced search
body: <p>I'm trying to use the Spotify web API to return multiple specific results in one response. </p>
  
  <p>For example, maybe I want Spotify's detailed information for "Thriller", by Michael Jackson, and "Highway Star", by Deep Purple.</p>
  
  <p>Since I don't already have the Spotify uris I need to use the Search method. And there's a page describing Spotify's advanced search syntax <a href="http://www.spotify.com/us/about/features/advanced-search-syntax/" rel="nofollow">here</a>. They support searching against specific fields, like track, artist, and album. They also support the basic boolean operators. </p>
  
  <p>But there's nothing on that page (or anywhere else on the internet, as far as I can tell) describing how the boolean operator precedence works, or how you might go about grouping your search criteria.</p>
  
  <p>I would need something effectively the same as (track:Thriller AND artist:"Michael Jackson") OR (track:"highway star" AND artist:"Deep Purple").</p>
  
  <p>Using similar criteria to pull in just one track at a time works:</p>
  
  <p><a href="http://ws.spotify.com/search/1/track?q=track%3a%22thriller%22+AND+artist%3a%22michael+jackson%22" rel="nofollow">http://ws.spotify.com/search/1/track?q=track:"thriller"+AND+artist:"michael+jackson"</a></p>
  
  <p>I tried to jump right in with the parentheses, even though they're not mentioned in the docs. No luck:</p>
  
  <p>ws.spotify.com/search/1/track?q=(track:"thriller"+AND+artist:"michael+jackson")+OR+(track:"highway+star"+AND+artist:"deep+purple")</p>
  
  <p>Then I thought I'd try playing with precedence. Maybe they don't just process left-to-right - maybe the ORs are all resolved, and then the ANDs:</p>
  
  <p>ws.spotify.com/search/1/track?q=track:"thriller"+OR+track:"highway+star"+AND+artist:"michael+jackson"+OR+artist:"deep+purple"</p>
  
  <p>That seemed promising, and returned 185 results, but it's not quite right. I'm seeing tracks named "Highway Star" from other bands. That seems to rule out "left-to-right", "OR-before-AND" AND "AND-before-OR". Which doesn't make any sense - what else is left?</p>
  
  <p>Can anyone with more Spotify experience shed some light on how a query like this should work?</p>