jimczi commented on issue #823: LUCENE-8939: Introduce Shared Count Early Termination In Parallel Search URL: https://github.com/apache/lucene-solr/pull/823#issuecomment-524350989 > Yes, that is correct, but adding it to TopFieldCollector would mean that it is a part of SimpleFieldCollector and PagingFieldCollector code paths as well, and I was conservatively not modifying existing functionality (not atleast until we discussed it in the community). I don't see what the modification is. The early termination logic is the same, the only diff is that the counter to check totalHitsThreshold is global in one case and local in the current impl. What I propose is to decorrelate the local totalHits that is needed to count the number of documents visited by the collector and the counter to check the `totalHitsThreshold`. A simple `BooleanSupplier` that checks if updateMinScore can be called won't change any existing functionality and you can hide this implementation detail by keeping the TopFieldCollector#create as they are today. Did I miss something ? > Are you referring to the case when the global hits counter is decremented right when we cross the threshold? Yes, why do you need to decrement the counter, any visited document should increment ?
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org