Pulkitg64 opened a new pull request, #16415: URL: https://github.com/apache/lucene/pull/16415
### Description When an index has had its raw full-precision float vectors dropped (the read-only "drop-FP" / searcher-node optimization, where the flat raw-vector file is empty and only the scalar-quantized bytes remain), [Lucene104ScalarQuantizedVectorsReader#getFloatVectorValues](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/codecs/lucene104/Lucene104ScalarQuantizedVectorsReader.java#L249) returned the bare dequantizing view [OffHeapScalarQuantizedFloatVectorValues](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/codecs/lucene104/OffHeapScalarQuantizedFloatVectorValues.java). As a result, the scorer returned by those FloatVectorValues scores documents on the float values obtained by dequantizing the stored quantized vectors. This diverges from the normal path (full-precision vectors present), where the scorer computes scores directly on the quantized vectors. The fix wraps the OffHeapScalarQuantizedFloatVectorValues with the quantized vector values, so that when full-precision vectors are absent, scoring uses the quantized vectors directly instead of first dequantizing them to floats and scoring on those. This mirrors the normal path: when full-precision vectors are present they are wrapped with the quantized values, and scorer() returns a quantized vector scorer. TODO: Add test case to simulate the behavior -- 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]
