private static final class RamUsageEstimator.RamUsageQueryVisitor extends QueryVisitor
| Modifier and Type | Field and Description |
|---|---|
(package private) long |
defSize |
(package private) Query |
root |
(package private) long |
total |
EMPTY_VISITOR| Constructor and Description |
|---|
RamUsageQueryVisitor(Query root,
long defSize) |
| Modifier and Type | Method and Description |
|---|---|
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, termCollectorlong total
long defSize
Query root
RamUsageQueryVisitor(Query root, long defSize)
public 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 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 visited