jimczi commented on code in PR #14426: URL: https://github.com/apache/lucene/pull/14426#discussion_r2027392059
########## lucene/core/src/java/org/apache/lucene/codecs/KnnVectorsReader.java: ########## @@ -130,4 +134,56 @@ public KnnVectorsReader getMergeInstance() { * <p>The default implementation is empty */ public void finishMerge() throws IOException {} + + /** A string representing the off-heap category for quantized vectors. */ + public static final String QUANTIZED = "QUANTIZED"; Review Comment: nit: I wonder if we should rather reflect the underlying format here. Something like flat_vector_float, flat_vector_byte, flat_vector_bbq? ########## lucene/core/src/java/org/apache/lucene/codecs/lucene102/Lucene102BinaryQuantizedVectorsReader.java: ########## @@ -257,6 +259,19 @@ public long ramBytesUsed() { return size; } + @Override + public Map<String, Long> getOffHeapByteSize(FieldInfo fieldInfo) { + Objects.requireNonNull(fieldInfo); + var raw = rawVectorsReader.getOffHeapByteSize(fieldInfo); + var fieldEntry = fields.get(fieldInfo.name); + if (fieldEntry == null) { + assert fieldInfo.getVectorEncoding() == VectorEncoding.BYTE; Review Comment: This is not possible, this format doesn't accept raw vector in the byte format. -- 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