ChrisHegarty commented on code in PR #12311: URL: https://github.com/apache/lucene/pull/12311#discussion_r1198253248
########## lucene/core/src/java/org/apache/lucene/util/VectorUtil.java: ########## @@ -270,4 +216,134 @@ public static float dotProductScore(byte[] a, byte[] b) { float denom = (float) (a.length * (1 << 15)); return 0.5f + dotProduct(a, b) / denom; } + + interface VectorUtilProvider { + + // just dot product for now + float dotProduct(float[] a, float[] b); + } + + private static VectorUtilProvider lookupProvider() { + // TODO: add a check + final int runtimeVersion = Runtime.version().feature(); + if (runtimeVersion == 20) { // TODO: do we want JDK 19? + try { + ensureReadability(); Review Comment: I refactored the code so that the presence of the module is enough to enable this. -- 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