dweiss commented on code in PR #803: URL: https://github.com/apache/lucene/pull/803#discussion_r845986080
########## 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: Return -1 if we "moved" from the source's position. ########## lucene/queries/src/java/org/apache/lucene/queries/intervals/ConjunctionMatchesIterator.java: ########## @@ -60,7 +60,11 @@ public int endPosition() { public int startOffset() throws IOException { int start = Integer.MAX_VALUE; for (MatchesIterator s : subs) { Review Comment: If any source offset is unknown, propagate it up. -- 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