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(QueryWrapperFilter()) ConstantScore(QueryWrapperFilter()) ConstantScore(QueryWrapperFilter()) ConstantScore(QueryWrapperFilter()) The thing is, the BooleanQueries contained in the QueryWrapperFilter()s have no clauses present. Would this affect the performance of the query at all? Is there a way I can prevent empty queries like these from being written if there is a performance penalty? Shaun