Class MultiTermHighlighting.AutomataCollector
java.lang.Object
org.apache.lucene.search.QueryVisitor
org.apache.lucene.search.uhighlight.MultiTermHighlighting.AutomataCollector
- Enclosing class:
MultiTermHighlighting
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final boolean(package private) List<LabelledCharArrayMatcher> Fields inherited from class org.apache.lucene.search.QueryVisitor
EMPTY_VISITOR -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateAutomataCollector(boolean lookInSpan, Predicate<String> fieldMatcher) -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptField(String field) Whether or not this field is of interest to the visitorvoidconsumeTermsMatching(Query query, String field, Supplier<ByteRunAutomaton> automaton) Called by leaf queries that match on a class of termsgetSubVisitor(BooleanClause.Occur occur, Query parent) Pulls a visitor instance for visiting child clauses of a queryMethods inherited from class org.apache.lucene.search.QueryVisitor
consumeTerms, termCollector, visitLeaf
-
Field Details
-
runAutomata
List<LabelledCharArrayMatcher> runAutomata -
lookInSpan
final boolean lookInSpan -
fieldMatcher
-
-
Constructor Details
-
AutomataCollector
-
-
Method Details
-
acceptField
Description copied from class:QueryVisitorWhether or not this field is of interest to the visitorImplement this to avoid collecting terms from heavy queries such as
TermInSetQuerythat are not running on fields of interest- Overrides:
acceptFieldin classQueryVisitor
-
getSubVisitor
Description copied from class:QueryVisitorPulls a visitor instance for visiting child clauses of a queryThe default implementation returns
this, unlessoccuris equal toBooleanClause.Occur.MUST_NOTin which case it returnsQueryVisitor.EMPTY_VISITOR- Overrides:
getSubVisitorin classQueryVisitor- Parameters:
occur- the relationship between the parent and its childrenparent- the query visited
-
consumeTermsMatching
Description copied from class:QueryVisitorCalled by leaf queries that match on a class of terms- Overrides:
consumeTermsMatchingin classQueryVisitor- Parameters:
query- the leaf queryfield- the field queried againstautomaton- a supplier for an automaton defining which terms match
-