title: Elasticsearch, Nested "ANDS" and "ORS"
body: <p>I am having some difficulty structuring the exact Elasticsearch query that I am looking for, specifically using the java api.</p>
  
  <p>It seems like if I construct a fieldsearch using the java api, I can only use a single field and a single term. If I use a querystring, it looks like I can apply an entire query to a set of fields. What I want to do is apply a specific query to one field, and another query to a different field. </p>
  
  <p>This is confusing I know. This is the type of query I would like to construct</p>
  
  <pre><code>(name contains "foo" or name contains "bar") AND ( date equals today)
  </code></pre>
  
  <p>I am really loving Elasticsearch for it's speed and flexibility, but the docs on <a href="http://www.elasticsearch.org/" rel="nofollow">http://www.elasticsearch.org/</a> are kind of tough to parse (I noticed "introduction" and "concepts" have no links, but the API section does) If anyone has some good resources on mastering these queries, I'd love to see them. Thanks!</p>