[ https://issues.apache.org/jira/browse/LUCENE-8422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16598475#comment-16598475 ]
Alan Woodward commented on LUCENE-8422: --------------------------------------- Here's a patch that adds IntervalsSource#matches instead. The IntervalIterator API is unchanged. A few things to note: 1) Conjunction intervals that eagerly advance in order to minimize themselves have been moved to a specialized class that caches Matches. This wraps things up nicely, and doesn't touch the classes used for searching. 2) The MatchesIterator returned from Intervals.containedBy() has the unusual property that its positions and offsets don't quite match up - the positions are taken from the internal interval, while the offsets are from the containing interval. This means that the MatchesIterator can be passed back up and used as an Iterator in a containing MatchesIterator, but that highlighters (which operate only on offsets) can correctly highlight the whole block. 3) All sources return {{null}} from {{MatchesIterator#getQuery()}}. {{IntervalQuery#matches()}} then substitutes in the top-level query. > Add Matches iteration to interval queries > ----------------------------------------- > > Key: LUCENE-8422 > URL: https://issues.apache.org/jira/browse/LUCENE-8422 > Project: Lucene - Core > Issue Type: New Feature > Reporter: Alan Woodward > Assignee: Alan Woodward > Priority: Major > Attachments: LUCENE-8422.patch, LUCENE-8422.patch > > > Follow up to LUCENE-8404, we can now add Matches iteration to interval > queries in the sandbox. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org