@Override
    public boolean equals(Object obj) {
        if (obj == this) return true;
        if (!super.equals(obj)) return false;

        Group rhs = (Group)obj;
        if (!equals(id, rhs.id)) return false;
        if (rank != rhs.rank) return false;
        if (!aggregationResults.equals(rhs.aggregationResults)) return false;
        if (!orderByIdx.equals(rhs.orderByIdx)) return false;
        if (!orderByExp.equals(rhs.orderByExp)) return false;
        if (!children.equals(rhs.children)) return false;
        return true;
    }
Adds an order-by expression to this group. If the expression is an AggregationResult, it will be added to the
list of this group's AggregationResults, and a reference to that expression is added instead. If the
AggregationResult is already present, a reference to THAT result is created instead.

@param exp the result to add
@param asc true to sort ascending, false to sort descending
@return this, to allow chaining
searchlib/src/main/java/com/yahoo/searchlib/aggregation/Group.java