Update lucene/core/src/java/org/apache/lucene/search/TopFieldCollector.java

replace modulo with a btiwise and (bis)

Co-Authored-By: Adrien Grand <jpountz@gmail.com>
This commit is contained in:
Jim Ferenczi 2019-10-21 13:36:39 +02:00 committed by GitHub
parent 7b0c096b91
commit 50ae67bf1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -238,7 +238,7 @@ public abstract class TopFieldCollector extends TopDocsCollector<Entry> {
totalHits++; totalHits++;
hitsThresholdChecker.incrementHitCount(); hitsThresholdChecker.incrementHitCount();
if (minScoreAcc != null && totalHits % minScoreAcc.modInterval == 0) { if (minScoreAcc != null && (totalHits & minScoreAcc.modInterval) == 0) {
updateGlobalMinCompetitiveScore(scorer); updateGlobalMinCompetitiveScore(scorer);
} }