Let's assume that we have the following Lucene query:
+(f1:x f2:x) +f3:y
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";
In old versions of Lucene, BooleanQuery offers a combine method that allows you to put parenthesis where you want.
Now in the newest version of Lucene, the combine method was removed and you have to go through the new BooleanQuery.builder.
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.
Does anybody know how to achieve this simple query using this new builder?