public void setGroupingString(String grouping) {
        groupingRequests.clear();
        this.grouping = grouping;
        SelectParser parser = (SelectParser) ParserFactory.newInstance(Query.Type.SELECT, new ParserEnvironment());
        for (VespaGroupingStep step : parser.getGroupingSteps(grouping)) {
            GroupingRequest.newInstance(parent)
                    .setRootOperation(step.getOperation())
                    .continuations().addAll(step.continuations());
        }
    }
Sets the grouping operation of the query.

@param grouping the grouping to perform as a JSON string on the format specified in
       <a href="https://docs.vespa.ai/en/reference/select-reference.html">the select reference doc</a>
container-search/src/main/java/com/yahoo/search/query/Select.java