jimczi commented on code in PR #13370: URL: https://github.com/apache/lucene/pull/13370#discussion_r1602010896
########## lucene/core/src/java/org/apache/lucene/codecs/hnsw/ScalarQuantizedVectorScorer.java: ########## @@ -165,6 +169,15 @@ public float score(int node) throws IOException { }; } + @Override + public float score(int firstOrd, int secondOrd) throws IOException { + return similarity.score( + values.vectorValue(firstOrd), Review Comment: Same here, this instance should be reserved since it is used by the `scorer(int ord)` case? ########## lucene/core/src/java/org/apache/lucene/codecs/hnsw/DefaultFlatVectorScorer.java: ########## @@ -109,6 +109,12 @@ public float score(int node) throws IOException { }; } + @Override + public float score(int firstOrd, int secondOrd) throws IOException { + return similarityFunction.compare( + vectors1.vectorValue(firstOrd), vectors2.vectorValue(secondOrd)); Review Comment: vectors1 instance is already used by the `scorer(int ord)` case. If we want to allow this I believe we need a third copy. -- 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