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, termCollectorfinal java.util.List<java.util.function.Function<TermWeightor,QueryTree>> children
public QueryVisitor getSubVisitor(BooleanClause.Occur occur, Query parent)
QueryVisitorthis, unless occur is equal
to BooleanClause.Occur.MUST_NOT in which case it returns
QueryVisitor.EMPTY_VISITORgetSubVisitor in class QueryVisitoroccur - the relationship between the parent and its childrenparent - the query visitedpublic void consumeTerms(Query query, Term... terms)
QueryVisitorconsumeTerms in class QueryVisitorquery - the leaf queryterms - the terms the query will match onpublic void visitLeaf(Query query)
QueryVisitorvisitLeaf in class QueryVisitorquery - the querypublic QueryTree apply(TermWeightor termWeightor)
apply in interface java.util.function.Function<TermWeightor,QueryTree>