slow-J commented on code in PR #16268:
URL: https://github.com/apache/lucene/pull/16268#discussion_r3519975101


##########
lucene/sandbox/src/java/org/apache/lucene/sandbox/facet/cutters/ranges/LongRangeFacetCutter.java:
##########
@@ -124,6 +152,39 @@ public static LongRangeFacetCutter create(
    */
   abstract List<InclusiveRange> buildElementaryIntervals();
 
+  /**
+   * Returns the {@link DocValuesSkipper} for {@link #skipField} in this 
segment. Null when: no skip
+   * field is configured, the field has no skip index, or some doc in this 
segment has more than one
+   * value.
+   */
+  final DocValuesSkipper maybeSkipper(LeafReaderContext context) throws 
IOException {
+    if (skipField == null) {
+      return null;
+    }
+    SortedNumericDocValues sortedNumeric = 
DocValues.getSortedNumeric(context.reader(), skipField);
+    if (DocValues.unwrapSingleton(sortedNumeric) == null) {
+      return null;
+    }
+    return context.reader().getDocValuesSkipper(skipField);
+  }
+
+  /** Single-valued {@link LongValues} for {@link #skipField} in this segment. 
*/
+  final LongValues skipFieldValues(LeafReaderContext context) throws 
IOException {
+    NumericDocValues values =
+        DocValues.unwrapSingleton(DocValues.getSortedNumeric(context.reader(), 
skipField));

Review Comment:
   Will do that in next commit.



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