[
https://issues.apache.org/jira/browse/LUCENE-8306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16534564#comment-16534564
]
Alan Woodward commented on LUCENE-8306:
---------------------------------------
I've been playing around with various options for this API, and I think the one
that fits best with highlighters is to add another method to Matches that
returns a PostingsEnum across all term matches for a particular field.
Highlighters can call {{Matches.getMatches(field)}} to get an iterator over
intervals, which will allow them to decide how to build passages, and then
{{Matches.getTermMatches(field)}} to get the individual term matches - this
would also allow for exposing term frequencies for scoring, payloads, etc.
I'm not sure yet whether or not to return a TermPostingsEnum or just a plain
PostingsEnum - the latter keeps the API surface low, but the former could be
useful for passage scoring.
> 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: [email protected]
For additional commands, e-mail: [email protected]