ChrisHegarty commented on code in PR #13200: URL: https://github.com/apache/lucene/pull/13200#discussion_r1548185076
########## lucene/core/src/java/org/apache/lucene/codecs/ByteVectorProvider.java: ########## @@ -33,6 +34,29 @@ public interface ByteVectorProvider { */ int dimension(); + /** + * Returns the byte offset of the byte vector value for the given target ordinal. + * + * @param targetOrd the ordinal of the target vector + * @return the byte offset of the byte vector value, or -1 if the offset isn't available. + */ + default long vectorByteOffset(int targetOrd) throws IOException { + return -1; + } + + /** Returns the byte length of the byte vector value. */ + default int vectorElementByteSize() { + return dimension(); + } + + /** + * Returns the {@link IndexInput} for the byte vector data or null if the data is not stored in a + * file. + */ + default IndexInput vectorData() throws IOException { Review Comment: I think that these three methods are exactly what we need. The IndexInput will start at the beginning of the actual vector data, and with the offset and element size, we can determine the address of any vector ordinal. -- 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