Class AggregationResult

    • Field Detail

      • classId

        public static final int classId
    • Constructor Detail

      • AggregationResult

        public AggregationResult()
    • Method Detail

      • getTag

        public int getTag()
        Returns the tag of this aggregation result. This is useful for uniquely identifying a result.
        Returns:
        The numerical tag.
      • setTag

        public AggregationResult setTag​(int tag)
        Assigns a tag to this group.
        Parameters:
        tag - the numerical tag to set.
        Returns:
        this, to allow chaining.
      • merge

        public void merge​(AggregationResult result)
        Called when merging aggregation results. This method is simply a proxy for the abstract onMerge(AggregationResult) method.
        Parameters:
        result - the result to merge with.
      • postMerge

        public void postMerge()
        Hook called when all aggregation results have been merged. This method can be overloaded by subclasses that need special behaviour to occur after merge.
      • getRank

        public abstract ResultNode getRank()
        Returns a value that can be used for ranking.
      • setExpression

        public AggregationResult setExpression​(ExpressionNode exp)
        Sets the expression to aggregate on.
        Parameters:
        exp - the expression
        Returns:
        this, to allow chaining
      • getExpression

        public ExpressionNode getExpression()
        Returns the expression to aggregate on.
      • onMerge

        protected abstract void onMerge​(AggregationResult result)
        Mmust be implemented by subclasses to support merge. It is called as the merge(AggregationResult) method is invoked.
        Parameters:
        result - the result to merge with
      • onSerialize

        protected void onSerialize​(com.yahoo.vespa.objects.Serializer buf)
        Overrides:
        onSerialize in class ExpressionNode
      • onDeserialize

        protected void onDeserialize​(com.yahoo.vespa.objects.Deserializer buf)
        Overrides:
        onDeserialize in class ExpressionNode
      • equalsAggregation

        protected abstract boolean equalsAggregation​(AggregationResult obj)
      • visitMembers

        public void visitMembers​(com.yahoo.vespa.objects.ObjectVisitor visitor)
        Overrides:
        visitMembers in class ExpressionNode