Package com.yahoo.searchlib.aggregation
Class MaxAggregationResult
java.lang.Object
com.yahoo.vespa.objects.Selectable
com.yahoo.vespa.objects.Identifiable
com.yahoo.searchlib.expression.ExpressionNode
com.yahoo.searchlib.aggregation.AggregationResult
com.yahoo.searchlib.aggregation.MaxAggregationResult
- All Implemented Interfaces:
Serializable,Cloneable
This is an aggregated result holding the maximum result of the matching hits.
- Author:
- baldersheim, Simon Thoresen Hult
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty result node.Constructs an instance of this class with given max value. -
Method Summary
Modifier and TypeMethodDescriptionclone()protected booleanfinal SingleResultNodegetMax()Returns the maximum value found in all matching hits.getRank()Returns a value that can be used for ranking.protected voidonDeserialize(com.yahoo.vespa.objects.Deserializer buf) protected intprotected voidonMerge(AggregationResult result) Mmust be implemented by subclasses to support merge.protected voidonSerialize(com.yahoo.vespa.objects.Serializer buf) final MaxAggregationResultsetMax(SingleResultNode max) Sets the maximum value found in all matching hits.voidvisitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor) Methods inherited from class com.yahoo.searchlib.aggregation.AggregationResult
equalsExpression, getExpression, getResult, getTag, merge, onExecute, onPrepare, postMerge, setExpression, setTagMethods inherited from class com.yahoo.searchlib.expression.ExpressionNode
equals, execute, executeIterative, onArgument, prepareMethods inherited from class com.yahoo.vespa.objects.Identifiable
create, createFromId, deserialize, deserializeOptional, deserializeWithId, equals, getClassId, getRawUtf8Bytes, getUtf8, hashCode, putUtf8, registerClass, serialize, serializeOptional, serializeWithId, toStringMethods inherited from class com.yahoo.vespa.objects.Selectable
select, select, selectMembers
-
Field Details
-
classId
public static final int classId
-
-
Constructor Details
-
MaxAggregationResult
public MaxAggregationResult()Constructs an empty result node. NOTE: This instance is broken until non-optional member data is set. -
MaxAggregationResult
Constructs an instance of this class with given max value.- Parameters:
max- The initial maximum to set.
-
-
Method Details
-
getMax
Returns the maximum value found in all matching hits.- Returns:
- The value.
-
setMax
Sets the maximum value found in all matching hits.- Parameters:
max- The value.- Returns:
- This, to allow chaining.
-
getRank
Description copied from class:AggregationResultReturns a value that can be used for ranking.- Specified by:
getRankin classAggregationResult
-
onGetClassId
protected int onGetClassId()- Overrides:
onGetClassIdin classAggregationResult
-
onSerialize
protected void onSerialize(com.yahoo.vespa.objects.Serializer buf) - Overrides:
onSerializein classAggregationResult
-
onDeserialize
protected void onDeserialize(com.yahoo.vespa.objects.Deserializer buf) - Overrides:
onDeserializein classAggregationResult
-
onMerge
Description copied from class:AggregationResultMmust be implemented by subclasses to support merge. It is called as theAggregationResult.merge(AggregationResult)method is invoked.- Specified by:
onMergein classAggregationResult- Parameters:
result- the result to merge with
-
equalsAggregation
- Specified by:
equalsAggregationin classAggregationResult
-
clone
- Overrides:
clonein classAggregationResult
-
visitMembers
public void visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor) - Overrides:
visitMembersin classAggregationResult
-