jpountz commented on code in PR #12415: URL: https://github.com/apache/lucene/pull/12415#discussion_r1276555327
########## lucene/core/src/java/org/apache/lucene/search/BooleanScorer.java: ########## @@ -154,19 +207,20 @@ public void collect(int doc) throws IOException { throw new IllegalArgumentException( "This scorer can only be used with two scorers or more, got " + scorers.size()); } - for (int i = 0; i < buckets.length; i++) { - buckets[i] = new Bucket(); + if (needsScores || minShouldMatch > 1) { Review Comment: Yes, we also use `BooleanScorer` when there is a mix of SHOULD and MUST_NOT clauses. But not when there are FILTER clauses. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org