Pulkitg64 commented on code in PR #16383:
URL: https://github.com/apache/lucene/pull/16383#discussion_r3572167718


##########
lucene/core/src/java/org/apache/lucene/codecs/lucene99/Lucene99FlatVectorsWriter.java:
##########
@@ -182,6 +183,7 @@ private static long alignOutput(IndexOutput output, 
VectorEncoding encoding) thr
         switch (encoding) {
           case BYTE -> Float.BYTES;
           case FLOAT32 -> 64; // optimal alignment for Arm Neoverse machines.
+          case FLOAT16 -> Float.BYTES;

Review Comment:
   No, I just used the default value same as Byte. But this can be follow up 
issue to check optimal alignment for Fp16 vectors. Thanks for raising this 
question.



##########
lucene/core/src/java/org/apache/lucene/codecs/KnnVectorsWriter.java:
##########
@@ -273,13 +312,19 @@ public static void mapOldOrdToNewOrd(
   public static final class MergedVectorValues {
     private MergedVectorValues() {}
 
-    private static void validateFieldEncoding(FieldInfo fieldInfo, 
VectorEncoding expected) {
+    private static void validateFieldEncoding(FieldInfo fieldInfo, 
VectorEncoding... expected) {
       assert fieldInfo != null && fieldInfo.hasVectorValues();
       VectorEncoding fieldEncoding = fieldInfo.getVectorEncoding();
-      if (fieldEncoding != expected) {
-        throw new UnsupportedOperationException(
-            "Cannot merge vectors encoded as [" + fieldEncoding + "] as " + 
expected);
+      for (VectorEncoding exp : expected) {

Review Comment:
   Oh this is from my old change.. Sorry I missed to remove it. 



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