GroupList build() {
            PageInfo page = new PageInfo(resultId, tag, stable, childGroups.size());
            GroupList groupList = new GroupList(transform.getLabel(tag));
            for (int i = page.firstEntry; i < page.lastEntry; ++i) {
                GroupBuilder child = childGroups.get(i);
                groupList.add(child.build(ranked ? child.group.getRank() :
                                          (double)(page.lastEntry - i) / (page.lastEntry - page.firstEntry)));
            }
            page.putContinuations(groupList.continuations());
            return groupList;
        }
Constructs the grouping result tree that corresponds to the parameters given to this builder. This method might
fail due to unsupported constructs in the results, in which case an exception is thrown.

@throws IllegalInputException Thrown if the grouping result contains unsupported constructs.
container-search/src/main/java/com/yahoo/search/grouping/vespa/ResultBuilder.java