OpenSearch/docs/reference/search/aggregations
Adrien Grand 7ea490dfd1 Aggregations: Return the sum of the doc counts of other buckets.
This commit adds a new field to the response of the terms aggregation called
`sum_other_doc_count` which is equal to the sum of the doc counts of the buckets
that did not make it to the list of top buckets. It is typically useful to have
a sector called eg. `other` when using terms aggregations to build pie charts.

Example query and response:

```json
GET test/_search?search_type=count
{
  "aggs": {
    "colors": {
      "terms": {
        "field": "color",
        "size": 3
      }
    }
  }
}
```

```json
{
   [...],
   "aggregations": {
      "colors": {
         "doc_count_error_upper_bound": 0,
         "sum_other_doc_count": 4,
         "buckets": [
            {
               "key": "blue",
               "doc_count": 65
            },
            {
               "key": "red",
               "doc_count": 14
            },
            {
               "key": "brown",
               "doc_count": 3
            }
         ]
      }
   }
}
```

Close #8213
2014-10-27 12:11:26 +01:00
..
bucket Aggregations: Return the sum of the doc counts of other buckets. 2014-10-27 12:11:26 +01:00
metrics Core: Make fetch phase nested doc aware 2014-10-08 22:21:30 +02:00
bucket.asciidoc Aggregations: Add `children` bucket aggregator that is able to map buckets between parent types and child types using the already builtin parent/child support. 2014-08-19 12:40:51 +02:00
metrics.asciidoc Aggregations: Scriptable Metrics Aggregation 2014-08-20 18:17:27 +01:00