ChrisHegarty commented on code in PR #13027:
URL: https://github.com/apache/lucene/pull/13027#discussion_r1463016033


##########
lucene/core/src/java/org/apache/lucene/util/ScalarQuantizer.java:
##########
@@ -201,13 +233,26 @@ public String toString() {
    *
    * @param floatVectorValues the float vector values from which to calculate 
the quantiles
    * @param confidenceInterval the confidence interval used to calculate the 
quantiles
+   * @param totalVectorCount the total number of live float vectors in the 
index. This is vital for
+   *     accounting for deleted documents when calculating the quantiles.
    * @return A new {@link ScalarQuantizer} instance
    * @throws IOException if there is an error reading the float vector values
    */
   public static ScalarQuantizer fromVectors(
-      FloatVectorValues floatVectorValues, float confidenceInterval) throws 
IOException {
+      FloatVectorValues floatVectorValues, float confidenceInterval, int 
totalVectorCount)

Review Comment:
   Alternatively, and if we're concerned about binary compatibility with 9.9.0, 
then this could be structured as a new additional override accepting the 
`totalVectorCount`, while retaining the the original signature that passes the 
`floatVectorValues.size()` and asserting that there are no deleted docs or 
something. This could be a bit "trappy", but no unreasonable if we think that 
we need to maintain binary compatibility.



-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to