javanna commented on a change in pull request #639: URL: https://github.com/apache/lucene/pull/639#discussion_r798383042
########## File path: lucene/core/src/test/org/apache/lucene/search/TestBooleanQuery.java ########## @@ -492,33 +493,43 @@ private void assertSameScoresWithoutFilters(IndexSearcher searcher, BooleanQuery final AtomicBoolean matched = new AtomicBoolean(); searcher.search( bq, - new SimpleCollector() { - int docBase; - Scorable scorer; - + new CollectorManager<SimpleCollector, Boolean>() { @Override - protected void doSetNextReader(LeafReaderContext context) throws IOException { - super.doSetNextReader(context); - docBase = context.docBase; - } - - @Override - public ScoreMode scoreMode() { - return ScoreMode.COMPLETE; + public SimpleCollector newCollector() { + return new SimpleCollector() { + int docBase; + Scorable scorer; + + @Override + protected void doSetNextReader(LeafReaderContext context) throws IOException { + super.doSetNextReader(context); + docBase = context.docBase; + } + + @Override + public ScoreMode scoreMode() { + return ScoreMode.COMPLETE; + } + + @Override + public void setScorer(Scorable scorer) { + this.scorer = scorer; + } + + @Override + public void collect(int doc) throws IOException { + final float actualScore = scorer.score(); + final float expectedScore = + searcher.explain(bq2, docBase + doc).getValue().floatValue(); + assertEquals(expectedScore, actualScore, 10e-5); + matched.set(true); + } + }; } @Override - public void setScorer(Scorable scorer) throws IOException { - this.scorer = scorer; - } - - @Override - public void collect(int doc) throws IOException { - final float actualScore = scorer.score(); - final float expectedScore = - searcher.explain(bq2, docBase + doc).getValue().floatValue(); - assertEquals(expectedScore, actualScore, 10e-5); - matched.set(true); + public Boolean reduce(Collection<SimpleCollector> collectors) { Review comment: this is a leftover from a previous attempt, thanks for catching it -- 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