romseygeek commented on a change in pull request #581: LUCENE-3041: QueryVisitor URL: https://github.com/apache/lucene-solr/pull/581#discussion_r260198917
########## File path: lucene/highlighter/src/java/org/apache/lucene/search/uhighlight/MultiTermHighlighting.java ########## @@ -17,180 +17,124 @@ package org.apache.lucene.search.uhighlight; import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; import java.util.List; -import java.util.function.Function; import java.util.function.Predicate; +import java.util.function.Supplier; -import org.apache.lucene.queries.function.FunctionScoreQuery; -import org.apache.lucene.search.AutomatonQuery; import org.apache.lucene.search.BooleanClause; -import org.apache.lucene.search.BooleanQuery; -import org.apache.lucene.search.BoostQuery; -import org.apache.lucene.search.ConstantScoreQuery; -import org.apache.lucene.search.DisjunctionMaxQuery; -import org.apache.lucene.search.FuzzyQuery; import org.apache.lucene.search.Query; -import org.apache.lucene.search.spans.SpanBoostQuery; -import org.apache.lucene.search.spans.SpanMultiTermQueryWrapper; -import org.apache.lucene.search.spans.SpanNearQuery; -import org.apache.lucene.search.spans.SpanNotQuery; -import org.apache.lucene.search.spans.SpanOrQuery; -import org.apache.lucene.search.spans.SpanPositionCheckQuery; +import org.apache.lucene.search.QueryVisitor; +import org.apache.lucene.search.spans.SpanQuery; import org.apache.lucene.util.UnicodeUtil; import org.apache.lucene.util.automaton.Automata; import org.apache.lucene.util.automaton.Automaton; import org.apache.lucene.util.automaton.ByteRunAutomaton; import org.apache.lucene.util.automaton.CharacterRunAutomaton; -import org.apache.lucene.util.automaton.LevenshteinAutomata; import org.apache.lucene.util.automaton.Operations; /** * Support for highlighting multi-term queries. * * @lucene.internal */ -class MultiTermHighlighting { +final class MultiTermHighlighting { private MultiTermHighlighting() { } /** * Extracts MultiTermQueries that match the provided field predicate. * Returns equivalent automata that will match terms. */ - public static CharacterRunAutomaton[] extractAutomata(Query query, Review comment: It's still used in PhraseHelper; I think we can rework UnifiedHighlighter in a follow-up, along with things like removing extractWeight(), given that this PR is already quite big? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org