Package org.apache.lucene.util
Class RamUsageEstimator.RamUsageQueryVisitor
- java.lang.Object
-
- org.apache.lucene.search.QueryVisitor
-
- org.apache.lucene.util.RamUsageEstimator.RamUsageQueryVisitor
-
- Enclosing class:
- RamUsageEstimator
private static final class RamUsageEstimator.RamUsageQueryVisitor extends QueryVisitor
-
-
Field Summary
Fields Modifier and Type Field Description (package private) long
defSize
(package private) Query
root
(package private) long
total
-
Fields inherited from class org.apache.lucene.search.QueryVisitor
EMPTY_VISITOR
-
-
Constructor Summary
Constructors Constructor Description RamUsageQueryVisitor(Query root, long defSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
consumeTerms(Query query, Term... terms)
Called by leaf queries that match on specific termsQueryVisitor
getSubVisitor(BooleanClause.Occur occur, Query parent)
Pulls a visitor instance for visiting child clauses of a query The default implementation returnsthis
, unlessoccur
is equal toBooleanClause.Occur.MUST_NOT
in which case it returnsQueryVisitor.EMPTY_VISITOR
void
visitLeaf(Query query)
Called by leaf queries that do not match on terms-
Methods inherited from class org.apache.lucene.search.QueryVisitor
acceptField, consumeTermsMatching, termCollector
-
-
-
-
Field Detail
-
total
long total
-
defSize
long defSize
-
root
Query root
-
-
Constructor Detail
-
RamUsageQueryVisitor
RamUsageQueryVisitor(Query root, long defSize)
-
-
Method Detail
-
consumeTerms
public void consumeTerms(Query query, Term... terms)
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
public void visitLeaf(Query query)
Description copied from class:QueryVisitor
Called by leaf queries that do not match on terms- Overrides:
visitLeaf
in classQueryVisitor
- Parameters:
query
- the query
-
getSubVisitor
public QueryVisitor getSubVisitor(BooleanClause.Occur occur, Query parent)
Description copied from class:QueryVisitor
Pulls a visitor instance for visiting child clauses of a query The default implementation returnsthis
, 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
-
-