[ https://issues.apache.org/jira/browse/LUCENE-8306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16546660#comment-16546660 ]
David Smiley commented on LUCENE-8306: -------------------------------------- I did a little review: * Shouldn't label() return the associated Query? If not then how might a highlighter do anything useful with it? The only thing I can imagine is simply recursively count the distinct label as a heuristic a match finding more or less terms than some other match. Even if one could *also* do that with a Query, a Query seems intrinsically more useful rather than some opaque Object. * the changes to SloppyPhraseMatcher seemed like maybe you fixed bugs too? e.g. startOffset being idempotent, if I'm reading that correctly * In SloppyPhraseMatcher.getSubMatches, is it really necessary to build up this {{int[][] submatches = new int[phrasePositions.length][3];}} thing vs working on PhrasePositions directly? * Shouldn't TermMatchesIterator.getSubMatches return EMPTY? It's already a leaf. > 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