parkertimmins commented on code in PR #16450:
URL: https://github.com/apache/lucene/pull/16450#discussion_r3693332351


##########
lucene/core/src/test/org/apache/lucene/search/TestDocValuesOrdinalSetIterator.java:
##########
@@ -156,21 +156,18 @@ private static List<Integer> 
collectMatches(DocValuesRangeIterator iter) throws
   // SortedDocValues (single-valued ordinals with a set)
   // ==========================================================================
 
-  /**
-   * Single ordinal per doc. Uses ordinal 14 (in the set) for the in-range 
region, and ordinal 15
-   * (in the gap) for the mixed region's case 2.
-   */
+  /** Single ordinal per doc. The in-range region alternates between a set 
member and a gap. */
   private static int singleOrdinal(int doc) {
     int d = doc % 1024;
     if (d < 128) {
-      return 14;
+      return (doc & 1) == 0 ? 14 : (int) GAP_ORD;

Review Comment:
   Add GAP_ORD, which is not a match, to test non-matches in a YES block



##########
lucene/core/src/test/org/apache/lucene/search/TestDocValuesOrdinalSetIterator.java:
##########
@@ -156,21 +156,18 @@ private static List<Integer> 
collectMatches(DocValuesRangeIterator iter) throws
   // SortedDocValues (single-valued ordinals with a set)
   // ==========================================================================
 
-  /**
-   * Single ordinal per doc. Uses ordinal 14 (in the set) for the in-range 
region, and ordinal 15
-   * (in the gap) for the mixed region's case 2.
-   */
+  /** Single ordinal per doc. The in-range region alternates between a set 
member and a gap. */
   private static int singleOrdinal(int doc) {
     int d = doc % 1024;
     if (d < 128) {
-      return 14;
+      return (doc & 1) == 0 ? 14 : (int) GAP_ORD;
     } else if (d < 256) {
       return (int) (QUERY_MAX + 1);
     } else if (d < 512) {
       return (int) (QUERY_MIN - 1);
     } else {
       return switch ((d / 2) % 3) {
-        case 0 -> (int) (QUERY_MIN - 1);
+        case 0 -> (int) QUERY_MAX;

Review Comment:
   Added a value in the ordinal set so that MAYBE blocks can be matches.



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