You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alan Woodward (JIRA)" <ji...@apache.org> on 2018/07/23 10:08:00 UTC

[jira] [Commented] (LUCENE-8422) Add Matches iteration to interval queries

    [ https://issues.apache.org/jira/browse/LUCENE-8422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16552585#comment-16552585 ] 

Alan Woodward commented on LUCENE-8422:
---------------------------------------

Here is a patch that adds a collection interface to IntervalIterators, and uses that to drive Matches iteration and sub-iteration.  There's a lot of shared code with Spans here, so I've extracted the common parts out into an InnerMatchesIterator in core.

Some intervals (ordered and unordered) eagerly advance the first sub-interval within a match to ensure that matches are minimal, which means we need to cache the collected intervals.  Because this might be expensive, I've added a new boolean to IntervalsSource.intervals() which tells the iterator up-front whether or not it needs to use a cache.  This is checked using assertions at the moment, but it might be better to throw IllegalStateException if collect() is called on an iterator generated without a cache.

> 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
>
>
> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org