# TopHits aggregations generates exception with SearchType=Count

**URL:** <https://discuss.elastic.co/t/tophits-aggregations-generates-exception-with-searchtype-count/21598>\
**Category:** Elasticsearch\
**Created:** [January 13, 2015, 6:53am UTC](https://discuss.elastic.co/t/tophits-aggregations-generates-exception-with-searchtype-count/21598 "2015-01-13T06:53:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![leonpo](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@leonpo](https://discuss.elastic.co/u/leonpo)\
**Post date:** [January 13, 2015, 6:53am UTC](https://discuss.elastic.co/t/tophits-aggregations-generates-exception-with-searchtype-count/21598/1 "2015-01-13T06:53:26Z")

</div>

Hello

I wanted to updated regarding some problem that only happens in multiple  
nodes configuration.  
If there is a aggregation queries with top hits aggregation but SearchType  
is set to "count", Elasticsearch 1.4.2 will throw following exception:

Failed to deserialize response of type  
[org.elasticsearch.search.query.QuerySearchResult]

Best Regards

Leon

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2c92b03c-7b57-4ab0-b065-dbde8e2f9a5a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2c92b03c-7b57-4ab0-b065-dbde8e2f9a5a%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:39am UTC](https://discuss.elastic.co/t/tophits-aggregations-generates-exception-with-searchtype-count/21598/2 "2017-07-06T00:39:26Z")

</div>

Closed on July 6, 2017, 12:39am UTC


