benwtrent commented on code in PR #13119: URL: https://github.com/apache/lucene/pull/13119#discussion_r1499170841
########## 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: Since (for some unknown reason to me), we already write out the values to the codec files & we don't want to break the current codec, this is fine with me. I think if/when we create a new HNSW/vector codecs in the future, we should consider not writing the danged similarity functions in two places. ########## 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: Could you add/complete your comment indicating that the values here need to be in order and the SAME order as the field info ones for bwc? -- 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