java.lang.Object
org.apache.lucene.search.QueryVisitor
org.apache.lucene.monitor.QueryAnalyzer.QueryBuilder
- All Implemented Interfaces:
Function<TermWeightor,QueryTree>
- Direct Known Subclasses:
QueryAnalyzer.Disjunction
- Enclosing class:
QueryAnalyzer
private class QueryAnalyzer.QueryBuilder
extends QueryVisitor
implements Function<TermWeightor,QueryTree>
-
Field Summary
FieldsFields inherited from class org.apache.lucene.search.QueryVisitor
EMPTY_VISITOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(TermWeightor termWeightor) voidconsumeTerms(Query query, Term... terms) Called by leaf queries that match on specific termsgetSubVisitor(BooleanClause.Occur occur, Query parent) Pulls a visitor instance for visiting child clauses of a queryvoidCalled by leaf queries that do not match on termsMethods inherited from class org.apache.lucene.search.QueryVisitor
acceptField, consumeTermsMatching, termCollector
-
Field Details
-
children
-
-
Constructor Details
-
QueryBuilder
private QueryBuilder()
-
-
Method Details
-
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
-
consumeTerms
Description copied from class:QueryVisitorCalled by leaf queries that match on specific terms- Overrides:
consumeTermsin classQueryVisitor- Parameters:
query- the leaf queryterms- the terms the query will match on
-
visitLeaf
Description copied from class:QueryVisitorCalled by leaf queries that do not match on terms- Overrides:
visitLeafin classQueryVisitor- Parameters:
query- the query
-
apply
- Specified by:
applyin interfaceFunction<TermWeightor,QueryTree>
-