benwtrent commented on code in PR #13119:
URL: https://github.com/apache/lucene/pull/13119#discussion_r1497494311


##########
lucene/core/src/java/org/apache/lucene/codecs/lucene99/Lucene99HnswVectorsReader.java:
##########
@@ -171,15 +172,25 @@ private void validateFieldEntry(FieldInfo info, 
FieldEntry fieldEntry) {
     }
   }
 
+  // List of vector similarity functions. This list is defined here, in order
+  // to avoid an undesirable dependency on the declaration and order of values
+  // in VectorSimilarityFunction. The list values and order have been chosen to
+  // match that of VectorSimilarityFunction in, at least, Lucene 9.10. Values
+  // should only be appended to the end of the list.
+  public static final List<VectorSimilarityFunction> SIMILARITY_FUNCTIONS =

Review Comment:
   🤔 OK, this is really weird to me. For some reason, we are writing the 
dimension & similarity into the vector metdata but that information is retained 
in the field info already. 
   
   I honestly don't know why we do this. Are we concerned that things will 
become out of sync? @msokolov maybe you know? I see this pattern all the way 
back in Lucene90.



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