You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/05/10 07:42:14 UTC
[GitHub] [lucene] jpountz commented on a diff in pull request #864: LUCENE-10555: avoid repeated NumericLeafComparator#setScorer calls
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-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org