title: OR and AND Operators in Elasticsearch query
body: <p>I have few json document with the following format :-</p>
  
  <pre><code>    _source: {
              userId: "A1A1",
              customerId: "C1",
              component: "comp_1",
              timestamp: 1408986553,
       }
  </code></pre>
  
  <p>I want to query the document based on the following :-</p>
  
  <pre><code>(( userId == currentUserId) OR ( customerId== currentCustomerId) OR (currentRole ==ADMIN) )  AND component= currentComponent)
  </code></pre>
  
  <p>I tried using the SearchSourceBuilder and QueryBuilders.matchQuery, but I wasnt able to put multiple sub queries with AND and OR operators.</p>
  
  <pre><code>SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
  searchSourceBuilder.query(QueryBuilders.matchQuery("userId",userId)).sort("timestamp", SortOrder.DESC).size(count);
  </code></pre>
  
  <p>How we query elasticsearch using OR and AND operators?</p>