次のように新しいバージョンサポートElasticserch重合操作において、重合操作はまた、ネストされてもよいです。
curl -XGET 10.4.44.19:9200/test/test/_search?pretty -d '
{
"aggs":{
"color_type_max":{
"terms":{
"field": "color"
},
"aggs":{
"max_age": {
"max": {
"field" : "age"
}
}
}
},
"color_type_min":{
"terms":{
"field": "color"
},
"aggs":{
"min_age": {
"min": {
"field" : "age"
}
}
}
}
}
}'
次のコマンドを実行します。
ます。https://my.oschina.net/u/204616/blog/545298で再現