kaivalnp commented on code in PR #15979:
URL: https://github.com/apache/lucene/pull/15979#discussion_r3592655655


##########
lucene/core/src/java/org/apache/lucene/index/KnnVectorValues.java:
##########
@@ -68,6 +68,21 @@ public int getVectorByteLength() {
     return dimension() * getEncoding().byteSize;
   }
 
+  /**
+   * Returns the byte offset within the backing storage for the vector at the 
given ordinal. The
+   * default implementation assumes vectors are stored contiguously: {@code 
ord *
+   * getVectorByteLength()}.
+   *
+   * <p>Formats that use indirection (e.g., de-duplicating formats with an 
ordinal mapping) should
+   * override this to return the correct offset.
+   *
+   * @param ord the vector ordinal
+   * @return the byte offset for the vector
+   */
+  public long ordToOffset(int ord) {

Review Comment:
   No longer needed in the latest iteration, the indirection is handled by a 
custom `FlatVectorsScorer`!



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