Affects Version/s: 2.4
Fix Version/s: None
Lucene Fields:New, Patch Available
BooleanQuery.rewrite does not respect minNumberShouldMatch if the number of clauses is 1. This causes inconsistencies for the queries "+def" and "+abc +def", while setting the minNumShouldMatch to '1' for both.
For the first query, results are returned although there are no SHOULD clauses in the query.
For the second query no results are returned.
The reason lies in the optimization BooleanQuery.rewrite has for one clauses queries.
Patch included - optimize the query for a single clause only if the minNumShouldMatch <= 0.
|Field||Original Value||New Value|
|Attachment||LUCENE-1134.patch [ 12373188 ]|
|Resolution||Fixed [ 1 ]|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Lucene Fields||[Patch Available, New]||[New, Patch Available]|
|Workflow||jira [ 12420939 ]||Default workflow, editable Closed status [ 12564619 ]|
|Workflow||Default workflow, editable Closed status [ 12564619 ]||jira [ 12584627 ]|
|Transition||Time In Source Status||Execution Times||Last Executer||Last Execution Date|
|18d 13h 12m||1||Michael Busch||03/Feb/08 08:21|