OpenSearch/docs/reference/search/aggregations/bucket
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
..
children-aggregation.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
datehistogram-aggregation.asciidoc Docs: Remove the 'Factor' paragraph to reflect #6490 2014-08-18 13:02:15 +02:00
daterange-aggregation.asciidoc [DOCS] Added "Aggregation" to all aggs titles 2014-05-13 01:35:58 +02:00
filter-aggregation.asciidoc [DOCS] Added "Aggregation" to all aggs titles 2014-05-13 01:35:58 +02:00
filters-aggregation.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
geodistance-aggregation.asciidoc Docs: Fixed invalid word count in geodistance agg doc 2014-07-11 18:35:36 +02:00
geohashgrid-aggregation.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
global-aggregation.asciidoc [DOCS] Added "Aggregation" to all aggs titles 2014-05-13 01:35:58 +02:00
histogram-aggregation.asciidoc Docs: Update histogram-aggregation.asciidoc 2014-07-07 10:44:11 +02:00
iprange-aggregation.asciidoc [DOCS] Added "Aggregation" to all aggs titles 2014-05-13 01:35:58 +02:00
missing-aggregation.asciidoc The description was incorrect 2014-09-10 16:05:03 +02:00
nested-aggregation.asciidoc [DOCS] Fixed json example in nested-aggregation.asciidoc 2014-06-18 19:38:02 +02:00
range-aggregation.asciidoc [DOCS] Added "Aggregation" to all aggs titles 2014-05-13 01:35:58 +02:00
reverse-nested-aggregation.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
significantterms-aggregation.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
terms-aggregation.asciidoc Aggregations: Return the sum of the doc counts of other buckets. 2014-10-27 12:11:26 +01:00