mikemccand commented on a change in pull request #923: LUCENE-8988: Introduce 
Global Feature Based Early Termination For Sorted Fields
URL: https://github.com/apache/lucene-solr/pull/923#discussion_r335018884
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/search/TopFieldCollector.java
 ##########
 @@ -130,8 +130,25 @@ public void setScorer(Scorable scorer) throws IOException 
{
         public void collect(int doc) throws IOException {
           ++totalHits;
           hitsThresholdChecker.incrementHitCount();
-          if (queueFull) {
-            if (collectedAllCompetitiveHits || reverseMul * 
comparator.compareBottom(doc) <= 0) {
+
+          Object currentValue = null;
+
+          if (fieldValueChecker != null) {
+            try {
+              currentValue = comparator.getDocValue(doc);
 
 Review comment:
   +1 to use benchmarks (sorting by `SORTED` so we see the penalty of the 
`ordinal` -> `BytesRef` lookup, and also sorting by simpler types -- `long`, 
`int`, etc.) to settle this.

----------------------------------------------------------------
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