private class QueryAnalyzer.QueryBuilder extends QueryVisitor implements java.util.function.Function<TermWeightor,QueryTree>
Modifier and Type | Field and Description |
---|---|
(package private) java.util.List<java.util.function.Function<TermWeightor,QueryTree>> |
children |
EMPTY_VISITOR
Modifier | Constructor and Description |
---|---|
private |
QueryBuilder() |
Modifier and Type | Method and Description |
---|---|
QueryTree |
apply(TermWeightor termWeightor) |
void |
consumeTerms(Query query,
Term... terms)
Called by leaf queries that match on specific terms
|
QueryVisitor |
getSubVisitor(BooleanClause.Occur occur,
Query parent)
Pulls a visitor instance for visiting child clauses of a query
The default implementation returns
this , unless occur is equal
to BooleanClause.Occur.MUST_NOT in which case it returns
QueryVisitor.EMPTY_VISITOR |
void |
visitLeaf(Query query)
Called by leaf queries that do not match on terms
|
acceptField, consumeTermsMatching, termCollector
final java.util.List<java.util.function.Function<TermWeightor,QueryTree>> children
public QueryVisitor getSubVisitor(BooleanClause.Occur occur, Query parent)
QueryVisitor
this
, unless occur
is equal
to BooleanClause.Occur.MUST_NOT
in which case it returns
QueryVisitor.EMPTY_VISITOR
getSubVisitor
in class QueryVisitor
occur
- the relationship between the parent and its childrenparent
- the query visitedpublic void consumeTerms(Query query, Term... terms)
QueryVisitor
consumeTerms
in class QueryVisitor
query
- the leaf queryterms
- the terms the query will match onpublic void visitLeaf(Query query)
QueryVisitor
visitLeaf
in class QueryVisitor
query
- the querypublic QueryTree apply(TermWeightor termWeightor)
apply
in interface java.util.function.Function<TermWeightor,QueryTree>