Nested polymerization Elasticsearch

 In the new version supported Elasticserch polymerization operation, the polymerization operation may also be nested, as follows:

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"
               }
             }
         }
      }
   }
}'

Run the following command:

Reproduced in: https: //my.oschina.net/u/204616/blog/545298

Guess you like

Origin blog.csdn.net/weixin_34080571/article/details/91989995