mikemccand commented on code in PR #16092:
URL: https://github.com/apache/lucene/pull/16092#discussion_r3328874586
##########
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:
This is a really cool approach @kaivalnp! Then any `KnnVectorsFormat` out
in the wild could quickly/easily insert preconditioning. Maybe look at
existing delegating formats (`PerFieldXXX`)?
--
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]