Pranshu-S opened a new pull request, #16764:
URL: https://github.com/apache/lucene/pull/16764

   
   ### Description
   
   <!--
   If this is your first contribution to Lucene, please make sure you have 
reviewed the contribution guide.
   https://github.com/apache/lucene/blob/main/CONTRIBUTING.md
   -->
   
   Lucene104ScalarQuantizedVectorsWriter computes a per-field centroid before 
quantizing full-precision vectors during a merge. The centroid is the mean of 
the full-precision vectors gathered from the segments being merged, and it is 
later used as the reference point for scalar quantization of every vector in 
the merged segment.
   
   When a source segment has deletions, the recalculation path iterated over 
the segment's FloatVectorValues without consulting `MergeState.liveDocs`, so 
deleted documents were still summed into the centroid. This skewed the centroid 
toward deleted data and degraded the quantization of every live vector in the 
merged segment.
   
     This change threads the per-reader liveDocs bit into accumulateCentroid 
and skips any doc that is not live, addressing the issue.
   
   Fixes issue - #16762


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