# Get Aggregate of Parent and Child Doc fields

**URL:** https://discuss.elastic.co/t/get-aggregate-of-parent-and-child-doc-fields/20988
**Category:** Elasticsearch
**Created:** [November 29, 2014, 6:08pm UTC](https://discuss.elastic.co/t/get-aggregate-of-parent-and-child-doc-fields/20988 "2014-11-29T18:08:32Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![suman\_reddy](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@suman\_reddy](https://discuss.elastic.co/u/suman_reddy)
#### Post date: [November 29, 2014, 6:08pm UTC](https://discuss.elastic.co/t/get-aggregate-of-parent-and-child-doc-fields/20988/1 "2014-11-29T18:08:32Z")

</div>

Hi,

In my ES query I have to get Aggregates on few of the Parent fields and  
two of Child Doc fields. The Child aggregates are to enire data at once  
(Not SubAggregates seperately for each Parent).

With the existing ES is it possible?. Or should I have the Child  
Aggregate in one query (on the Child docs) and Parent Aggr in other query  
seperately (Currently I am able to only do like this).

Thanks  
Suman

--  
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/e3089b5b-6c86-4869-afcd-357fcdea1225%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e3089b5b-6c86-4869-afcd-357fcdea1225%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:47am UTC](https://discuss.elastic.co/t/get-aggregate-of-parent-and-child-doc-fields/20988/2 "2017-07-06T00:47:04Z")

</div>


