Class AggregatorNode
java.lang.Object
com.yahoo.search.grouping.request.GroupingNode
com.yahoo.search.grouping.request.GroupingExpression
com.yahoo.search.grouping.request.AggregatorNode
- Direct Known Subclasses:
AvgAggregator
,CountAggregator
,MaxAggregator
,MinAggregator
,StandardDeviationAggregator
,SumAggregator
,XorAggregator
This class represents an aggregated value in a
GroupingExpression
. Because it operates on a list of data, it
can not be used as a document-level expression (i.e. level 0, see GroupingExpression.resolveLevel(int)
). The
contained expression is evaluated at the level of the aggregator minus 1.- Author:
- Simon Thoresen Hult
-
Constructor Summary
ModifierConstructorDescriptionprotected
AggregatorNode
(String image, String label, Integer level) protected
AggregatorNode
(String image, String label, Integer level, GroupingExpression exp) -
Method Summary
Modifier and TypeMethodDescriptionReturns the expression that this node aggregates on.void
resolveLevel
(int level) Resolves the conceptual level of this expression.void
visit
(ExpressionVisitor visitor) Recursively callsExpressionVisitor.visitExpression(GroupingExpression)
for this expression and all of its argument expressions.Methods inherited from class com.yahoo.search.grouping.request.GroupingExpression
asImage, asString, copy, getLevel, getLevelOrNull, setLabel
Methods inherited from class com.yahoo.search.grouping.request.GroupingNode
getImage, getLabel, toString
-
Constructor Details
-
AggregatorNode
-
AggregatorNode
-
-
Method Details
-
getExpression
Returns the expression that this node aggregates on.- Returns:
- The expression.
-
resolveLevel
public void resolveLevel(int level) Description copied from class:GroupingExpression
Resolves the conceptual level of this expression. This level represents the type of data that is consumed by this expression, where level 0 is a single hit, level 1 is a group, level 2 is a list of groups, and so forth. This method verifies the input level against the expression type, and recursively resolves the level of all argument expressions.- Overrides:
resolveLevel
in classGroupingExpression
- Parameters:
level
- The level of the input data.
-
visit
Description copied from class:GroupingExpression
Recursively callsExpressionVisitor.visitExpression(GroupingExpression)
for this expression and all of its argument expressions.- Overrides:
visit
in classGroupingExpression
- Parameters:
visitor
- The visitor to call.
-