Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
7.0
-
None
-
New, Patch Available
Description
A couple of BooleanQuery rewrites / optimizations.
First, as discussed on the user group, a BooleanQuery with a query that is both a SHOULD and a FILTER can be rewritten as a single MUST query, but care must be taken to decrement minShouldMatch by 1.
Another case is if a query is both required (MUST or FILTER) and MUST_NOT at the same time, it can be converted to a MatchNoDocsQuery (although I haven't discussed this yet so hopefully I'm not missing something!).
Attachments
Attachments
Issue Links
- is related to
-
LUCENE-7469 TestBooleanRewrites.testRandom() failures
- Closed