jimczi commented on a change in pull request #877: LUCENE-8978: Maximal Bottom
Score Based Early Termination
URL: https://github.com/apache/lucene-solr/pull/877#discussion_r324129841
##########
File path:
lucene/core/src/java/org/apache/lucene/search/TopScoreDocCollector.java
##########
@@ -74,11 +75,25 @@ public void collect(int doc) throws IOException {
totalHits++;
hitsThresholdChecker.incrementHitCount();
- if (score <= pqTop.score) {
Review comment:
I find this simpler:
`if (score <= pqTop.score && (bottomValueChecker == null || score <
bottomValueChecker.getBottomValue()) {`
This is redundant for the segment that holds the current max minimum score
but we can optimize this case later, when the logic is fully implemented.
When comparing the global minimum score we need to use lesser than `<`
rather than `<=`. This is important since we tiebreak on document id and the
global minimum score can come from a document id that is **after** this local
segment. We can also optimize this part and record the global document id that
is associated with the current max score in the BottomValueChecker but that's
not necessary in the first iteration IMO.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]