gsmiller commented on code in PR #12671:
URL: https://github.com/apache/lucene/pull/12671#discussion_r1359402306


##########
lucene/core/src/java/org/apache/lucene/search/VectorSimilarityValuesSource.java:
##########
@@ -32,6 +33,52 @@ public VectorSimilarityValuesSource(String fieldName) {
     this.fieldName = fieldName;
   }
 
+  /**
+   * 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:
   This smelled like a non-backwards-compatible change to me at first, but I 
see these methods were just recently added in `DoubleValuesSource` and are 
proposed for 9.9, so we can still move them around.



##########
lucene/core/src/java/org/apache/lucene/search/DoubleValuesSource.java:
##########
@@ -43,6 +40,9 @@
  * {@link #fromScorer(Scorable)} and passing the resulting DoubleValues to 
{@link
  * #getValues(LeafReaderContext, DoubleValues)}. The scores can then be 
accessed using the {@link
  * #SCORES} DoubleValuesSource.
+ *
+ * <p>Also see {@link DoubleValuesSourceUtil} class that provides some 
concrete implementations of

Review Comment:
   It looks like `DoubleValuesSourceUtil` is meant only to provide specific 
implementation details but users would still just interact with this class's 
factory methods right? (and the other related xxValuesSource classes). If 
that's the intention, I wonder if it's even worth mentioning 
`DoubleValueSourceUtil` in the javadoc? Might create more confusion than 
benefit.



-- 
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

Reply via email to