Pulkitg64 commented on code in PR #13401: URL: https://github.com/apache/lucene/pull/13401#discussion_r1613033827
########## lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene90/Lucene90FieldInfosFormat.java: ########## @@ -257,11 +269,12 @@ private static DocValuesType getDocValuesType(IndexInput input, byte b) throws I } } - private static VectorSimilarityFunction getDistFunc(IndexInput input, byte b) throws IOException { - if (b < 0 || b >= VectorSimilarityFunction.values().length) { - throw new CorruptIndexException("invalid distance function: " + b, input); + /** Returns VectorSimilarityFunction from index input and ordinal value */ + public static VectorSimilarityFunction getDistFunc(IndexInput input, byte b) throws IOException { + if ((int) b < 0 || (int) b >= SIMILARITY_FUNCTIONS_MAP.size()) { Review Comment: Done -- 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