OpenSearch/docs/reference/search
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
..
aggregations Aggregations: Return the sum of the doc counts of other buckets. 2014-10-27 12:11:26 +01:00
request Core: cutover to Lucene's query rescorer 2014-10-18 05:25:50 -04:00
suggesters Docs: Fix order for PUT _mapping docs 2014-10-16 18:49:36 +02:00
aggregations.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
benchmark.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
count.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
exists.asciidoc Search Exists API: Checks if any matching documents exist for a given query 2014-07-31 15:42:30 -04:00
explain.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
facets.asciidoc Facets: Removal from master. 2014-08-21 10:34:39 +02:00
more-like-this.asciidoc Added the ability to include the queried document for More Like This API. 2014-05-09 12:59:39 +02:00
multi-search.asciidoc Facets: Removal from master. 2014-08-21 10:34:39 +02:00
percolate.asciidoc Docs: missing quote 2014-10-21 12:52:12 +02:00
request-body.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
search-shards.asciidoc Docs: Fixed path to search-shards 2014-07-26 15:05:53 +02:00
search-template.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
search.asciidoc [DOCS] Reorganised common API conventions 2013-10-13 16:46:56 +02:00
suggesters.asciidoc Update suggesters.asciidoc 2014-09-28 11:04:28 +02:00
uri-request.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
validate.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00