BooleanQuery has been used traditionally like this:
BooleanQuery q = new BooleanQuery();
q.add( otherQuery, Occur.SOMETHING );
But now both the no-arguments constructor is deprecated, and adding clauses to the instance is deprecated too. Code needs to be updated to use org.apache.lucene.search.BooleanQuery.Builder instead, as in Lucene 6 all queries become immutable. |