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


##########
lucene/core/src/java/org/apache/lucene/search/BulkScorer.java:
##########
@@ -90,4 +90,13 @@ public abstract int score(LeafCollector collector, Bits 
acceptDocs, int min, int
 
   /** Same as {@link DocIdSetIterator#cost()} for bulk scorers. */
   public abstract long cost();
+
+  /**
+   * Optional operation: set the target cost. When set to a value that is less 
that {@link #cost()},

Review Comment:
   Javadocs of `DocIdSetIterator` say this:
   
   ```
   This is generally an upper bound of the number of documents this iterator 
might match, but may be a rough heuristic, hardcoded value, or otherwise 
completely inaccurate.
   ```
   
   Taking advantage of this new API indeed relies on the cost() being somewhat 
meaningful.



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