ChrisHegarty commented on code in PR #14978:
URL: https://github.com/apache/lucene/pull/14978#discussion_r2230815414


##########
lucene/core/src/java/org/apache/lucene/util/hnsw/RandomVectorScorer.java:
##########
@@ -34,6 +34,21 @@ public interface RandomVectorScorer {
    */
   float score(int node) throws IOException;
 
+  /**
+   * Score a list of numNodes and store the results in the scores array.
+   *
+   * <p>This may be more efficient than calling {@link #score(int)} for each 
node.
+   *
+   * @param nodes array of nodes to score.
+   * @param scores output array of scores corresponding to each node.
+   * @param numNodes number of nodes to score. Must not exceed length of nodes 
or scores arrays.
+   */
+  default void bulkScore(int[] nodes, float[] scores, int numNodes) throws 
IOException {

Review Comment:
   ++ this signature is more flexible than what I've been iterating on so far.  
I'm going to update my experiments to use similar.



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