private RootGroup convertResult(RequestContext requestContext, Map<Integer, Grouping> groupingMap,
                                    HitConverter hitConverter) {
        ResultBuilder builder = new ResultBuilder();
        builder.setHitConverter(hitConverter);
        builder.setTransform(requestContext.transform);
        builder.setRequestId(requestContext.request.getRequestId());
        for (Integer grpId : requestContext.idList) {
            builder.addGroupingResult(groupingMap.get(grpId));
        }
        builder.build();
        return builder.getRoot();
    }
Converts the results of the given request context into a single {@link Group}.

@param requestContext the context that identifies the results to convert
@param groupingMap    the map of all {@link Grouping} objects available
@param hitConverter   the converter to use for {@link Hit} conversion
@return the corresponding root RootGroup.
container-search/src/main/java/com/yahoo/search/grouping/vespa/GroupingExecutor.java