[ https://issues.apache.org/jira/browse/LUCENE-8306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16545498#comment-16545498 ]
Alan Woodward commented on LUCENE-8306: --------------------------------------- I ended up back where [~jimczi] suggested about a month ago. The attached patch adds two new methods to MatchesIterator: * label() - allows you to associate the current match with a top-level leaf query * getSubMatches() - returns another MatchesIterator over the individual term positions within the current match This doesn't expose terms, freqs or payloads. I figure let's try and keep the API as low-surface as possible for now, and see how far we get with highlighting. > 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, 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