msokolov commented on a change in pull request #361: URL: https://github.com/apache/lucene/pull/361#discussion_r724204344
########## File path: lucene/core/src/test/org/apache/lucene/search/TestKnnVectorQuery.java ########## @@ -204,6 +207,64 @@ public void testScore() throws IOException { } } + public void testScoreDotProduct() throws IOException { Review comment: good idea, I'll add a test ########## File path: lucene/core/src/java/org/apache/lucene/util/VectorUtil.java ########## @@ -115,19 +115,23 @@ public static float squareDistance(float[] v1, float[] v2) { /** * Modifies the argument to be unit length, dividing by its l2-norm. IllegalArgumentException is * thrown for zero vectors. + * + * @return the input array after normalization */ - public static void l2normalize(float[] v) { + public static float[] l2normalize(float[] v) { l2normalize(v, true); + return v; Review comment: Hm I thought I had done that ! :) It does say "modifies the argument", and "return the input array". I'm open to suggestions for improvement, of course, but not sure what more to say -- 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