uschindler commented on code in PR #16431:
URL: https://github.com/apache/lucene/pull/16431#discussion_r3676035239


##########
lucene/core/src/java/org/apache/lucene/search/DoubleValuesSource.java:
##########
@@ -278,28 +289,48 @@ public static DoubleValues similarityToQueryVector(
   }
 
   /**
-   * Creates a DoubleValuesSource that wraps a generic NumericDocValues field
+   * Creates a DoubleValuesSource that wraps a generic NumericDocValues field.
+   * Assumes no monotonic direction by default (Monotonicity.NONE).
    *
    * @param field the field to wrap, must have NumericDocValues
    * @param decoder a function to convert the long-valued doc values to doubles
    */
   public static DoubleValuesSource fromField(String field, 
LongToDoubleFunction decoder) {
-    return new FieldValuesSource(field, decoder);
+    return fromField(field, decoder, Monotonicity.NONE);
+  }
+
+  /**
+   * Creates a DoubleValuesSource that wraps a generic NumericDocValues field
+   *
+   * @param field the field to wrap, must have NumericDocValues
+   * @param decoder a function to convert the long-valued doc values to doubles
+   * @param monotonicity the monotonicity direction of the decoder function
+   */
+  public static DoubleValuesSource fromField(String field, 
LongToDoubleFunction decoder, Monotonicity monotonicity) {
+    return new FieldValuesSource(field, decoder, monotonicity);
+  }
+
+  /**
+   * @deprecated Use {@link #fromField(String, LongToDoubleFunction, 
Monotonicity)}
+   */
+  @Deprecated

Review Comment:
   This method is new in this pr, no need to add a new deprecated method. 
Remove it!



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to