I am rewriting some BooleanQueries and the end result contains some empty
queries.
The initial query is of the form: Field1:foo* Field2:foo* Field3:foo*
Field4:foo* Field5:foo* Field6:foo*
The rewritten query is of the form: ConstantScore(Field1:foo*)
ConstantScore(Field2:foo*) ConstantScore(Quer
For 2.9, I believe there's hardly any runtime cost to the embedded
BooleanQuery instances that have no clauses -- when the scorer method
is invoked, it will return null, which will in turn translate into an
DocIdSet.EMPTY_DOCIDSET that ends the iteration immediately on the
first call to nextDoc.
B