code: void addSubAggs(QueryConverter queryConverter, Aggregation agg, AggregationBuilder builder) {
          Map<String, Aggregation> aggs = agg.getAggs();
          for (String key : aggs.keySet()) {
              Aggregation subAgg = aggs.get(key);
              AbstractAggregationBuilder subBuilder = queryConverter.converterAggregation(subAgg);
              if (subBuilder != null) {
                  builder.subAggregation(subBuilder);
              }
          }
      }
docs: add sub-aggs when building search request