# How to get rid of sum\_other\_doc\_count in aggregations?

**URL:** https://discuss.elastic.co/t/how-to-get-rid-of-sum-other-doc-count-in-aggregations/50022
**Category:** Elasticsearch
**Created:** [May 13, 2016, 6:02pm UTC](https://discuss.elastic.co/t/how-to-get-rid-of-sum-other-doc-count-in-aggregations/50022 "2016-05-13T18:02:02Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![AndreyL](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andreyl/32/19365_2.png) [@AndreyL](https://discuss.elastic.co/u/AndreyL)
#### Post date: [May 13, 2016, 6:02pm UTC](https://discuss.elastic.co/t/how-to-get-rid-of-sum-other-doc-count-in-aggregations/50022/1 "2016-05-13T18:02:02Z")

</div>

I am running an aggregation to see what document types does my 'documents' index has (documentType is the field that has the type):

```
GET my_documents/_search
{
  size: 0,
  "aggs": {
    "dataTypes": {
      "terms": {
        "field": "documentType"
      }
    }
  }
}

```

I get results like:

```
"aggregations": {
    "dataTypes": {
      "doc_count_error_upper_bound": 0,
      "sum_other_doc_count": 41,
      "buckets": [
        {
          "key": "pdf",
          "doc_count": 63
        },
        {
          "key": "msw8",
          "doc_count": 59
        },
        {
          "key": "pdf_archive",
          "doc_count": 11
        },
        {
          "key": "msw12",
          "doc_count": 10
        },
        {
          "key": "mdoc55",
          "doc_count": 9
        },
        {
          "key": "excel8book",
          "doc_count": 7
        },
        {
          "key": "crtext",
          "doc_count": 6
        },
        {
          "key": "maker55",
          "doc_count": 5
        },
        {
          "key": "excel12book",
          "doc_count": 4
        },
        {
          "key": "excel12bbook",
          "doc_count": 2
        }
      ]
    }
  }

```

I know for a fact that there are some other values in that field that are not listed (I see those values in the regular search); also sum\_other\_doc\_count is not zero which tells me that it's not showing everything. My question is - how do I make it show all values in the resulting aggregation?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 5, 2017, 10:51pm UTC](https://discuss.elastic.co/t/how-to-get-rid-of-sum-other-doc-count-in-aggregations/50022/2 "2017-07-05T22:51:33Z")

</div>


