# No aggregation node in result

**URL:** https://discuss.elastic.co/t/no-aggregation-node-in-result/2209
**Category:** Elasticsearch
**Created:** [June 9, 2015, 11:43am UTC](https://discuss.elastic.co/t/no-aggregation-node-in-result/2209 "2015-06-09T11:43:55Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jerome\_tan](https://avatars.discourse-cdn.com/v4/letter/j/97f17d/32.png) [@jerome\_tan](https://discuss.elastic.co/u/jerome_tan)
#### Post date: [June 9, 2015, 11:43am UTC](https://discuss.elastic.co/t/no-aggregation-node-in-result/2209/1 "2015-06-09T11:43:55Z")

</div>

# I want aggregrate records by "\_type" field with Javascript client running in browser: The code is pretty simple:

# ![](https://us1.discourse-cdn.com/elastic/original/1X/c6f22890035804c7a1e4c7ede586ccc55677b0ec.jpg)

And in result is only returns:  
TRACE: 2015-06-09T11:41:19Z  
-\> POST [http://192.168.102.241:9200/logstash-\*/\_search?search\_type=count&ignore\_unavailable=true&size=0&aggregations=](http://192.168.102.241:9200/logstash-*/_search?search_type=count&ignore_unavailable=true&size=0&aggregations=)

\<- 200  
{  
"took": 1,  
"timed\_out": false,  
"\_shards": {  
"total": 5,  
"successful": 5,  
"failed": 0  
},  
"hits": {  
"total": 59451,  
"max\_score": 0,  
"hits":   
}  
}

no "aggregation node in result", while I try use CURL,  
it returns:  
{  
"took" : 4,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 5,  
"successful" : 5,  
"failed" : 0  
},  
"hits" : {  
"total" : 59451,  
"max\_score" : 0.0,  
"hits" :   
},  
"aggregations" : {  
"bairro\_count" : {  
"doc\_count\_error\_upper\_bound" : 0,  
"sum\_other\_doc\_count" : 0,  
"buckets" : [ {  
"key" : "proeuction",  
"doc\_count" : 59451  
} ]  
}  
}  
}

Is there any missing in my code?

---

<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:08am UTC](https://discuss.elastic.co/t/no-aggregation-node-in-result/2209/2 "2017-07-06T00:08:51Z")

</div>


