shubhamvishu commented on code in PR #12548: URL: https://github.com/apache/lucene/pull/12548#discussion_r1357050474
########## lucene/core/src/java/org/apache/lucene/search/DoubleValuesSource.java: ########## @@ -172,6 +173,52 @@ public LongValuesSource rewrite(IndexSearcher searcher) throws IOException { } } + /** + * Returns a DoubleValues instance for computing the vector similarity score per document against + * the byte query vector + * + * @param ctx the context for which to return the DoubleValues + * @param queryVector byte query vector + * @param vectorField knn byte field name + * @return DoubleValues instance + * @throws IOException if an {@link IOException} occurs + */ + public static DoubleValues similarityToQueryVector( Review Comment: Sure. I see different DVS use cases implemented as static classes here making this less readable. How about we move those static classes and functions(like you pointed) into a new class `DoubleValuesSourceUtil` maybe(only thing those classes are private currently)?. I'll open a followup PR to address that. -- 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