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


##########
lucene/core/src/java/org/apache/lucene/codecs/lucene104/Lucene104ScalarQuantizedVectorsReader.java:
##########
@@ -212,7 +236,22 @@ public RandomVectorScorer getRandomVectorScorer(String 
field, float[] target) th
             fi.vectorDataOffset,
             fi.vectorDataLength,
             quantizedVectorData),
-        target);
+        scoringTarget);
+  }
+
+  private HadamardRotation rotationFor(String field, int dimension) {
+    return rotations.computeIfAbsent(
+        field,
+        f ->
+            HadamardRotation.create(
+                dimension, 
Lucene104ScalarQuantizedVectorsFormat.rotationSeed(f)));
+  }
+
+  private boolean isRotationEnabled(String field) {

Review Comment:
   Instead of adding rotation code to a specific format, can we create a new 
vector format that simply rotates the incoming vector in all functions, and 
passes it on to a delegate?
   
   This would cleanly separate rotation functionality + make it re-usable 
across any arbitrary vector format.



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