mirror of https://github.com/apache/lucene.git
LUCENE-8127: Speed up rewriteNoScoring when there are no MUST clauses.
This commit is contained in:
parent
c0f8e6075d
commit
7a38394765
|
@ -141,6 +141,9 @@ Improvements
|
|||
classes to use the optimized variants through the MR-JAR mechanism.
|
||||
(Uwe Schindler, Robert Muir, Adrien Grand, Mike McCandless)
|
||||
|
||||
* LUCENE-8127: Speed up rewriteNoScoring when there are no MUST clauses.
|
||||
(Michael Braun via Adrien Grand)
|
||||
|
||||
Bug Fixes
|
||||
|
||||
* LUCENE-8077: Fixed bug in how CheckIndex verifies doc-value iterators.
|
||||
|
|
|
@ -183,6 +183,9 @@ public class BooleanQuery extends Query implements Iterable<BooleanClause> {
|
|||
}
|
||||
|
||||
private BooleanQuery rewriteNoScoring() {
|
||||
if (clauseSets.get(Occur.MUST).size() == 0) {
|
||||
return this;
|
||||
}
|
||||
BooleanQuery.Builder newQuery = new BooleanQuery.Builder();
|
||||
newQuery.setMinimumNumberShouldMatch(getMinimumNumberShouldMatch());
|
||||
for (BooleanClause clause : clauses) {
|
||||
|
|
Loading…
Reference in New Issue