public Grouping setRoot(Group root) {
        this.root = Objects.requireNonNull(root);
        return this;
    }
Sets the root group.

@param root the group to set as root
@return this, to allow chaining
@throws NullPointerException if <code>root</code> argument is null
searchlib/src/main/java/com/yahoo/searchlib/aggregation/Grouping.java