pipcet commented on a change in pull request #1045: LUCENE-9072: Find matching terms from Matches API URL: https://github.com/apache/lucene-solr/pull/1045#discussion_r358616667
########## File path: lucene/core/src/java/org/apache/lucene/search/Matches.java ########## @@ -44,4 +47,9 @@ */ Collection<Matches> getSubMatches(); + /** + * Find all matching terms + */ + void getMatchingTerms(Consumer<Term> termsConsumer) throws IOException; + Review comment: Wouldn't this make more sense as a method of `MatchesIterator`? In conjunction with some changes to `PhraseWeight` and `SloppyPhraseMatcher`, that would allow us to accurately capture reordered phrases, which I think `getMatchingTerms` would be a good API for. My proposed use case is to modify `AnalyzingInfixSuggester` to use a `PhraseQuery` (with slop) and expose this data in order to suggest a reordered phrase to the user without including the entire document in the response. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org