# Aggregations issue in response of elastic search 5.6

**URL:** <https://discuss.elastic.co/t/aggregations-issue-in-response-of-elastic-search-5-6/193042>\
**Category:** Elasticsearch\
**Created:** [July 31, 2019, 6:05am UTC](https://discuss.elastic.co/t/aggregations-issue-in-response-of-elastic-search-5-6/193042 "2019-07-31T06:05:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayasree](https://avatars.discourse-cdn.com/v4/letter/j/57b2e6/32.png) [@jayasree](https://discuss.elastic.co/u/jayasree)\
**Post date:** [July 31, 2019, 6:05am UTC](https://discuss.elastic.co/t/aggregations-issue-in-response-of-elastic-search-5-6/193042/1 "2019-07-31T06:05:06Z")

</div>

Elastic search 2.4 was used previously and now it has been upgraded to 5.6. I am using the below structure to query the result:

{  
"query": {  
"multi\_match": {  
"query": "' . $searchstringmsg . '",  
"type": "most\_fields",  
"fields": [  
"post\_title",  
"post\_content",  
"custom.cat\_name",  
"custom.series\_name",  
"custom.topic\_name",  
"custom.pos\_format",  
"custom.genre\_name",  
"post\_author.display\_name",  
"post\_meta.wps\_subtitle",  
"terms.post\_tag.name"  
],  
"fuzziness": "1"  
}  
},  
"aggs": {  
"top-sites": {  
"terms": {  
"field": "custom.pos\_format"  
},  
"aggs": {  
"top\_tags\_hits": {  
"top\_hits": {}  
}  
}  
}  
}  
}

Issue: I am getting an empty response of aggregations in the response. As shared like below. Please look in to it.

"aggregations": {  
"top-sites": {  
"buckets": ,  
"sum\_other\_doc\_count": 0,  
"doc\_count\_error\_upper\_bound": 0  
}  
}

---

<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:** [August 28, 2019, 6:05am UTC](https://discuss.elastic.co/t/aggregations-issue-in-response-of-elastic-search-5-6/193042/2 "2019-08-28T06:05:09Z")

</div>

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