jpountz commented on a change in pull request #1351: LUCENE-9280: Collectors to 
skip noncompetitive documents
URL: https://github.com/apache/lucene-solr/pull/1351#discussion_r410688678
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/search/TopFieldCollector.java
 ##########
 @@ -432,7 +461,9 @@ static TopFieldCollector create(Sort sort, int numHits, 
FieldDoc after,
       throw new IllegalArgumentException("hitsThresholdChecker should not be 
null");
     }
 
-    FieldValueHitQueue<Entry> queue = FieldValueHitQueue.create(sort.fields, 
numHits);
+    // here we assume that if hitsThreshold was set, we let a comparator to 
skip non-competitive docs
+    boolean filterNonCompetitveDocs = hitsThresholdChecker.getHitsThreshold() 
== Integer.MAX_VALUE ? false : true;
 
 Review comment:
   ```suggestion
       boolean filterNonCompetitiveDocs = 
hitsThresholdChecker.getHitsThreshold() == Integer.MAX_VALUE ? false : true;
   ```

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


With regards,
Apache Git Services

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

Reply via email to