public Group addAggregationResult(AggregationResult result) {
        if (aggregationResults.size() >= MAX_AGGREGATIONS) {
            throw new IllegalArgumentException("You have reached the limit for number of aggregations of " + MAX_AGGREGATIONS);
        }
        aggregationResults = add(aggregationResults, result);
        return this;
    }
Adds an aggregation result to this group.

@param result the result to add
@return this, to allow chaining
searchlib/src/main/java/com/yahoo/searchlib/aggregation/Group.java