title: Boolean logic in RESTful filtering and queries
body: <p>This is sort of a follow-up to <a href="https://stackoverflow.com/q/207477/421049">someone else's question</a> about filtering/querying a list of cars. There the recommendation for a RESTful filtering request was to put filter expressions in the query of the URI, like this:</p>
  
  <pre><code>/cars?color=blue&amp;type=sedan&amp;doors=4
  </code></pre>
  
  <p>That's fine. But what if my filtering query becomes more complicated and I need to use Boolean operators, such as:</p>
  
  <pre><code>((color=blue OR type=sedan) AND doors=4) OR color=red
  </code></pre>
  
  <p>That is, I want to find a four-door blue car or a four-door sedan, but if the car is red I'll take it without caring about any of the other properties.</p>
  
  <p>Is there any sort of convention for providing Boolean expressions in a RESTful URI's query parameters? I suppose I could by create some new querying expression language and put it in a <code>POST</code>, but that seems like a heavy and proprietary approach. How are others solving this?</p>