我有一个聚合,
MetricsAggregationBuilder aggregation =
AggregationBuilders
.cardinality("agg")
.field("age");
我有另一个包含'agg'
的聚合FilterAggregationBuilder filterAggregationBuilder = AggregationBuilders.filter("agf");
filterAggregationBuilder.filter(FilterBuilders.termFilter("age", 20));
filterAggregationBuilder.subAggregation(aggregation);
我可以使用
获得agf聚合Cardinality agg2 = searchResponse.getAggregations().get("agf");
但我怎样才能得到聚合'agg'和'agg'的值