iverase commented on code in PR #15783:
URL: https://github.com/apache/lucene/pull/15783#discussion_r2869743788


##########
lucene/core/src/java/org/apache/lucene/codecs/lucene104/Lucene104ScalarQuantizedVectorsReader.java:
##########
@@ -400,41 +400,19 @@ public 
org.apache.lucene.util.quantization.QuantizedByteVectorValues getQuantize
               + " expected: "
               + VectorEncoding.FLOAT32);
     }
-    var qv =
-        OffHeapScalarQuantizedVectorValues.load(
-            fi.ordToDocDISIReaderConfiguration,
-            fi.dimension,
-            fi.size,
-            new OptimizedScalarQuantizer(fi.similarityFunction),
-            fi.scalarEncoding,
-            fi.similarityFunction,
-            vectorScorer,
-            fi.centroid,
-            fi.centroidDP,
-            fi.vectorDataOffset,
-            fi.vectorDataLength,
-            quantizedVectorData);
-    return new org.apache.lucene.util.quantization.QuantizedByteVectorValues() 
{
-      @Override
-      public float getScoreCorrectionConstant(int ord) throws IOException {
-        return 0;
-      }
-
-      @Override
-      public byte[] vectorValue(int ord) throws IOException {
-        return qv.vectorValue(ord);
-      }
-
-      @Override
-      public int dimension() {
-        return qv.dimension();
-      }
-
-      @Override
-      public int size() {
-        return qv.size();
-      }
-    };
+    return OffHeapScalarQuantizedVectorValues.load(

Review Comment:
   This is the key of this PR so we avoid wrapping the quantized values here.



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