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

replace modulo with a bitwise and (ter)

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

View File

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