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) void
consumeTerms
(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 queryvoid
Called 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:QueryVisitor
Pulls a visitor instance for visiting child clauses of a queryThe default implementation returns
this
, unlessoccur
is equal toBooleanClause.Occur.MUST_NOT
in which case it returnsQueryVisitor.EMPTY_VISITOR
- Overrides:
getSubVisitor
in classQueryVisitor
- Parameters:
occur
- the relationship between the parent and its childrenparent
- the query visited
-
consumeTerms
Description copied from class:QueryVisitor
Called by leaf queries that match on specific terms- Overrides:
consumeTerms
in classQueryVisitor
- Parameters:
query
- the leaf queryterms
- the terms the query will match on
-
visitLeaf
Description copied from class:QueryVisitor
Called by leaf queries that do not match on terms- Overrides:
visitLeaf
in classQueryVisitor
- Parameters:
query
- the query
-
apply
- Specified by:
apply
in interfaceFunction<TermWeightor,
QueryTree>
-