vigyasharma commented on code in PR #12794: URL: https://github.com/apache/lucene/pull/12794#discussion_r1399616466
########## lucene/core/src/java/org/apache/lucene/search/AbstractKnnVectorQuery.java: ########## @@ -79,24 +81,30 @@ public Query rewrite(IndexSearcher indexSearcher) throws IOException { filterWeight = null; } + MaxScoreAccumulator globalMinSimAcc = new MaxScoreAccumulator(); TaskExecutor taskExecutor = indexSearcher.getTaskExecutor(); List<LeafReaderContext> leafReaderContexts = reader.leaves(); List<Callable<TopDocs>> tasks = new ArrayList<>(leafReaderContexts.size()); for (LeafReaderContext context : leafReaderContexts) { - tasks.add(() -> searchLeaf(context, filterWeight)); + tasks.add(() -> searchLeaf(context, filterWeight, globalMinSimAcc)); Review Comment: Doesn't look like it is shared across tasks in the [IndexSearcher](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java#L669-L687), right? For each slice, we have a single collector. And each collector gets its own `MaxScoreAccumulator`? -- 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