You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2019/10/01 08:21:15 UTC

[GitHub] [lucene-solr] jimczi commented on a change in pull request #904: LUCENE-8992: Share minimum score across segment in concurrent search

jimczi commented on a change in pull request #904: LUCENE-8992: Share minimum score across segment in concurrent search
URL: https://github.com/apache/lucene-solr/pull/904#discussion_r329931723
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/search/TopScoreDocCollector.java
 ##########
 @@ -139,7 +140,8 @@ public void collect(int doc) throws IOException {
 
           if (score > after.score || (score == after.score && doc <= afterDoc)) {
             // hit was collected on a previous page
-            if (totalHitsRelation == TotalHits.Relation.EQUAL_TO && hitsThresholdChecker.isThresholdReached()) {
+            if ((totalHitsRelation == TotalHits.Relation.EQUAL_TO || shouldUpdateMinScore())
 
 Review comment:
   The idea here is that currently we call updateMinCompetitiveScore only once when the threshold is reached, we also update the minimum score when the queue is full and a new competitive hit is inserted. However now that the minimum score can be updated by other collectors it is possible that the global minimum score changed while the local one remains unchanged (because we see only non-competitive hits). This change ensures that we update the current min score to take into account the new global minimum score if it is greater than the local one. I think it's important because otherwise we'll miss a lot of updates to the global minimum score (e.g. if the collector only see non-competitive hits). 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org