costin commented on code in PR #16144:
URL: https://github.com/apache/lucene/pull/16144#discussion_r3324621896


##########
lucene/core/src/java/org/apache/lucene/search/LeafCollector.java:
##########
@@ -94,6 +94,11 @@ public interface LeafCollector {
    * <p>The default implementation calls {@link #collect(DocIdStream)} on a 
{@link DocIdStream} that
    * matches the given range.
    *
+   * <p>The {@link Scorable} set via {@link #setScorer} is not guaranteed to 
be positioned on any
+   * document within the range. Implementations must not call {@link 
Scorable#score()} or rely on
+   * scorer positioning inside this method. Use {@link #collect(int)} if 
per-document scores are
+   * needed.

Review Comment:
   Updated the javadoc.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to