jpountz commented on code in PR #864:
URL: https://github.com/apache/lucene/pull/864#discussion_r868918283


##########
lucene/core/src/java/org/apache/lucene/search/comparators/NumericComparator.java:
##########
@@ -165,10 +166,11 @@ public void copy(int slot, int doc) throws IOException {
 
     @Override
     public void setScorer(Scorable scorer) throws IOException {
-      if (scorer instanceof Scorer) {
+      if (hasSetScorer == false && scorer instanceof Scorer) {

Review Comment:
   IMO the information that matters here is not that much that the Scorer has 
been set, but more that the iterator cost has been set. What about setting 
`iteratorCost` to -1 initially, and checking here whether it's still -1 or if 
it has been set?



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

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to