How to get sum_other_doc_count in aggregations?

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 want to get sum_other_doc_count value. Can anyone please help how can I do this

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