title: BooleanQuery.combine using the BooleanQuery.Builder in Lucene
body: <p>Let's assume that we have the following Lucene query:</p>
  
  <pre><code>+(f1:x f2:x) +f3:y
  </code></pre>
  
  <p>This means that the result must contain the value "x" in the field "f1" or the field "f2" and the field "f3" must contain the value "y";</p>
  
  <p>In old versions of Lucene, BooleanQuery offers a combine method that allows you to put parenthesis where you want.</p>
  
  <p>Now in the newest version of Lucene, the combine method was removed and you have to go through the new BooleanQuery.builder.</p>
  
  <p>The problem is that the only way you can add clauses to a builder, is to "add" them with the matching Occur needed. There is no way to assemble clauses between parenthesis.</p>
  
  <p>Does anybody know how to achieve this simple query using this new builder?</p>