Aggregation: Remove a aggregation buckets from multi aggregated response

GET testing/_search
{
  "size": 0, 
  "aggs": {
    "users": {
      "terms": {
        "field": "user.keyword",
        "size": 225000
      },
      "aggs": {
        "followers_count": {
          "max": {
            "field": "followers"
          }
        }
      }
    },
    "count": {
      "sum_bucket": {
        "buckets_path": "users>followers_count"
      }
    }
  }
}

from the above query, i need only the count aggregation bucket. How to do that. The whole response takes much time to load because of the size. Thanks in advance.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.