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


##########
lucene/core/src/java/org/apache/lucene/search/DoubleValuesSource.java:
##########
@@ -46,6 +47,16 @@
  */
 public abstract class DoubleValuesSource implements SegmentCacheable {
 
+  /** Monotonicity direction of a decoder function */
+  public enum Monotonicity {
+    /** Increasing function */
+    INCREASING,

Review Comment:
   I think it would still work if it is constant. In that case it would see the 
first doc with the constant value. After that it asks to skip, but provides the 
constant value. The code then needs to revisit all docs, because the comparison 
to min and max score needs to revisit all docs with exact same score. It can 
only exclude docs with larger or less vale (that don't exist).
   
   Maybe add a test. 😜



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