apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.45k stars 973 forks source link

Ensure negative scores aren not returned from scalar quantization scorer #13356

Closed benwtrent closed 1 month ago

benwtrent commented 1 month ago

Depending on how we quantize and then scale, we can edge down below 0 for dotproduct scores.

This is exceptionally rare, I have only seen it in extreme circumstances in tests (with random data and low dimensionality).