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?