romseygeek commented on code in PR #803:
URL: https://github.com/apache/lucene/pull/803#discussion_r846412825


##########
lucene/queries/src/java/org/apache/lucene/queries/intervals/ExtendedIntervalsSource.java:
##########
@@ -53,9 +55,60 @@ public IntervalMatchesIterator matches(String field, 
LeafReaderContext ctx, int
     if (in == null) {
       return null;
     }
+
+    IntervalMatchesIterator inNoOffsets =
+        new IntervalMatchesIterator() {
+          IntervalMatchesIterator delegate = in;
+
+          @Override
+          public int gaps() {
+            return delegate.gaps();
+          }
+
+          @Override
+          public int width() {
+            return delegate.width();
+          }
+
+          @Override
+          public boolean next() throws IOException {
+            return delegate.next();
+          }
+
+          @Override
+          public int startPosition() {
+            return delegate.startPosition();
+          }
+
+          @Override
+          public int endPosition() {
+            return delegate.endPosition();
+          }
+

Review Comment:
   I think we should always return -1 here? After all, we will always be 
extending things in at least one direction, so we will never be able to return 
correct offsets for the whole interval.



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