kaivalnp commented on code in PR #17013:
URL: https://github.com/apache/lucene/pull/17013#discussion_r4568980588


##########
lucene/core/src/java/org/apache/lucene/codecs/lucene104/Lucene104ScalarQuantizedVectorScorer.java:
##########
@@ -123,18 +124,38 @@ private RandomVectorScorer getRandomQuantizedVectorScorer(
         || scalarEncoding == ScalarEncoding.DIBIT_QUERY_NIBBLE) {
       OptimizedScalarQuantizer.transposeHalfByte(scratch, targetQuantized);
     }
+    return getQuantizedQueryScorer(similarityFunction, qv, targetQuantized, 
targetCorrectiveTerms);
+  }
+
+  /**
+   * Returns a scorer of a quantized query against the vectors of {@code qv}. 
Subclasses may
+   * override this to score the vectors another way.
+   *
+   * @param quantizedQuery the query, quantized to {@link 
ScalarEncoding#getQueryBits()} and packed
+   *     like the query side of the encoding
+   * @param queryCorrections the corrective terms of the quantized query
+   * @lucene.internal
+   */
+  protected RandomVectorScorer getQuantizedQueryScorer(

Review Comment:
   Right, the only difference is that `getRandomQuantizedVectorScorer` takes a 
`float[] query` as input, first quantizes it to `byte[] targetQuantized, 
QuantizationResult targetCorrectiveTerms`, and then calls 
`getQuantizedQueryScorer` (which works on an already quantized vector).
   
   I'll rename functions to make this clearer.



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