Github user jimczi commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/496#discussion_r232800133
  
    --- Diff: 
lucene/core/src/java/org/apache/lucene/search/TopFieldCollector.java ---
    @@ -68,6 +68,18 @@ public void setScorer(Scorable scorer) throws 
IOException {
       }
     
       static boolean canEarlyTerminate(Sort searchSort, Sort indexSort) {
    --- End diff --
    
    This function is called only when `indexSort` is 
[non-null](https://github.com/apache/lucene-solr/pull/496/files#diff-3cc08a69c598981a1dca4cb3dca2d59dR114),
 however `canEarlyTerminateOnDocId` doesn't require the index to be sorted. I 
think you can move the `indexSort == null` check into  
`canEarlyTerminateOnPrefix` ?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to