es 怎么使用Java Api进行大于2个字段的聚合,例如sql的 group by a,b,c
Elasticsearch | 作者 keydyre | 发布于2018年06月15日 | 阅读数:4454
AggregationBuilder aggregation = AggregationBuilders.terms("t_module").field("module.keyword")
.subAggregation(AggregationBuilders.terms("t_manner").field("manner.keyword"))
.subAggregation(AggregationBuilders.terms("t_source").field("source.keyword"));
聚合后结果为t_mode下 分别包含 t_manner和t_source。
希望达到效果 t_mode下包含t_manner,t_manner下包含t_source。
请大神帮忙回答下。谢谢
.subAggregation(AggregationBuilders.terms("t_manner").field("manner.keyword"))
.subAggregation(AggregationBuilders.terms("t_source").field("source.keyword"));
聚合后结果为t_mode下 分别包含 t_manner和t_source。
希望达到效果 t_mode下包含t_manner,t_manner下包含t_source。
请大神帮忙回答下。谢谢
1 个回复
strglee
赞同来自: