jpountz 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_r333532436
##########
File path: lucene/core/src/java/org/apache/lucene/search/TopFieldCollector.java
##########
@@ -123,13 +124,22 @@ public LeafCollector getLeafCollector(LeafReaderContext
context) throws IOExcept
@Override
public void setScorer(Scorable scorer) throws IOException {
super.setScorer(scorer);
+ minCompetitiveScore = 0f;
updateMinCompetitiveScore(scorer);
+ if (minScoreAcc != null) {
+ updateGlobalMinCompetitiveScore(scorer);
+ }
}
@Override
public void collect(int doc) throws IOException {
++totalHits;
hitsThresholdChecker.incrementHitCount();
+
+ if (minScoreAcc != null && totalHits % minScoreAcc.modInterval == 0)
{
Review comment:
I wonder whether the JVM manages to optimize this remainder call to run it
as `totalHits & 0x3ff`.
----------------------------------------------------------------
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]