dsmiley commented on a change in pull request #1037: LUCENE-9062: QueryVisitor.consumeTermsMatching URL: https://github.com/apache/lucene-solr/pull/1037#discussion_r350484060
########## File path: lucene/highlighter/src/java/org/apache/lucene/search/uhighlight/MemoryIndexOffsetStrategy.java ########## @@ -72,9 +73,6 @@ private static CharacterRunAutomaton buildCombinedAutomaton(UHComponents compone MultiTermHighlighting.extractAutomata(spanQuery, components.getFieldMatcher(), true));//true==lookInSpan } - if (allAutomata.size() == 1) { Review comment: Can't you make this method, buildCombinedAutomaton, return a CharArrayMatcher now? Then you could retain this optimization for a single automata, and also simplify the last anonymous implementation to *not* be a CharacterRunAutomaton. ---------------------------------------------------------------- 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