Description
We've found a bug in Lucene104ScalarQuantizedVectorFormat where the scorer is returning different documents scores after merging segments together. The test case can be found here (on branch_10x)
Before merge, docs returned and scores are:
{0=3.5892557207262143E-5, 1=6.082725012674928E-4, 2=1.0}
After merge, docs returned and scores are:
{0=3.581063720048405E-5, 1=6.144083454273641E-4, 2=0.0}
Doc 2 (which matches the query vector), has changed from 1.0 to 0.0
This only occurs with the PACKED_NIBBLE encoding.
Version and environment details
Reproduces on main and branch_10x