lucene
f16007c3 - Fix NPE when sampling for quantization in Lucene99HnswScalarQuantizedVectorsFormat (#13027)

Commit
1 year ago
Fix NPE when sampling for quantization in Lucene99HnswScalarQuantizedVectorsFormat (#13027) When merging `Lucene99HnswScalarQuantizedVectorsFormat` a NPE is possible when deleted documents are present. `ScalarQuantizer#fromVectors` doesn't take deleted documents into account. This means using `FloatVectorValues#size` may actually be larger than the actual size of live documents. Consequently, when iterating for sampling iteration too far is possible and an NPE will be thrown.
Author
Parents
Loading