@Override
    protected void onSerialize(Serializer buf) {
        buf.putInt(null, id);
        byte tmp = valid ? (byte)1 : (byte)0;
        buf.putByte(null, tmp);
        tmp = all ? (byte)1 : (byte)0;
        buf.putByte(null, tmp);
        buf.putLong(null, topN);
        buf.putInt(null, firstLevel);
        buf.putInt(null, lastLevel);
        buf.putInt(null, groupingLevels.size());
        for (GroupingLevel level : groupingLevels) {
            if (level.hasFilter())
                level.setV2();
            level.serializeWithId(buf);
        }
        root.serializeWithId(buf);
    }
Returns whether ordering will need results collected in children.
In that case we will probably just do a single pass.
searchlib/src/main/java/com/yahoo/searchlib/aggregation/Grouping.java