benwtrent commented on code in PR #12729:
URL: https://github.com/apache/lucene/pull/12729#discussion_r1379919203


##########
lucene/core/src/java/org/apache/lucene/codecs/lucene99/Lucene99HnswVectorsReader.java:
##########
@@ -399,41 +281,30 @@ private HnswGraph getGraph(FieldEntry entry) throws 
IOException {
 
   @Override
   public void close() throws IOException {
-    IOUtils.close(vectorData, vectorIndex, quantizedVectorData);
+    IOUtils.close(flatVectorsReader, vectorIndex);
   }
 
   @Override
-  public OffHeapQuantizedByteVectorValues getQuantizedVectorValues(String 
field)
-      throws IOException {
-    FieldEntry fieldEntry = fields.get(field);
-    if (fieldEntry == null || fieldEntry.hasQuantizedVectors() == false) {
-      return null;
+  public QuantizedByteVectorValues getQuantizedVectorValues(String field) 
throws IOException {
+    if (flatVectorsReader instanceof QuantizedVectorsReader) {
+      return ((QuantizedVectorsReader) 
flatVectorsReader).getQuantizedVectorValues(field);

Review Comment:
   @jpountz I honestly don't know. It is sort of like having `getHnswGraph` 
part of the `KnnVectorsReader`. It assumes that this is a thing that all 
readers will need. The only thing that needs this `getQuantizedVectorValues` is 
something that is merging `int8` quantized values.



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