# Grandchildren aggregation in ElasticSearch 1.5

**URL:** <https://discuss.elastic.co/t/grandchildren-aggregation-in-elasticsearch-1-5/48193>\
**Category:** Elasticsearch\
**Created:** [April 22, 2016, 5:06pm UTC](https://discuss.elastic.co/t/grandchildren-aggregation-in-elasticsearch-1-5/48193 "2016-04-22T17:06:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ashish\_Goel](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Ashish\_Goel](https://discuss.elastic.co/u/Ashish_Goel)\
**Post date:** [April 22, 2016, 5:06pm UTC](https://discuss.elastic.co/t/grandchildren-aggregation-in-elasticsearch-1-5/48193/1 "2016-04-22T17:06:42Z")

</div>

Hi there,

When I try to use children aggregation within a children aggregation, I get a NullPointerException.  
I have come to know that this "grandchildren" aggregation works with Elasticsearch 2.0. I wanted to know if it works with Elasticsearch 1.5. Or, I am doing something wrong in the aggregation call.  
Example call:

> {  
> "aggs": {  
> "toLearner": {  
> "children": {  
> "type": "learner"  
> },  
> "aggs": {  
> "toEL": {  
> "children": {  
> "type": "entity\_learner"  
> },  
> "aggs": {  
> "termsId": {  
> "terms": {  
> "field": "entity"  
> }  
> }  
> }  
> }  
> }  
> }  
> }  
> }

---

<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 5, 2017, 10:56pm UTC](https://discuss.elastic.co/t/grandchildren-aggregation-in-elasticsearch-1-5/48193/2 "2017-07-05T22:56:57Z")

</div>


