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

Alan Woodward commented on LUCENE-8306:
---------------------------------------

bq. Can we do without this new API?

I think it's important, particularly if we're talking about highlighting terms 
in very large intervals.  Here's an updated patch.  I've changed the API to use 
a collector interface rather than returning a list, which will make things much 
easier to implement on Spans and Intervals.  I've also implemented it on exact 
and sloppy phrases, including a test against a sloppy phrase with repeats.  
It's ended up simplifying the SloppyPhraseMatcher slightly, as I was trying to 
do too much to report the intervals (and getting inaccurate results in certain 
circumstances, which this API revealed, so it's already been useful!)

> Allow iteration over the term positions of a Match
> --------------------------------------------------
>
>                 Key: LUCENE-8306
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8306
>             Project: Lucene - Core
>          Issue Type: New Feature
>            Reporter: Alan Woodward
>            Assignee: Alan Woodward
>            Priority: Major
>         Attachments: LUCENE-8306.patch, LUCENE-8306.patch
>
>
> For multi-term queries such as phrase queries, the matches API currently just 
> returns information about the span of the whole match.  It would be useful to 
> also expose information about the matching terms within the phrase.  The same 
> would apply to Spans and Interval queries.



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

Reply via email to