# How to get count along with parent in elastic search 6?

**URL:** <https://discuss.elastic.co/t/how-to-get-count-along-with-parent-in-elastic-search-6/165066>\
**Category:** Elasticsearch\
**Created:** [January 21, 2019, 2:35pm UTC](https://discuss.elastic.co/t/how-to-get-count-along-with-parent-in-elastic-search-6/165066 "2019-01-21T14:35:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![karan.j.shah](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@karan.j.shah](https://discuss.elastic.co/u/karan.j.shah)\
**Post date:** [January 21, 2019, 2:35pm UTC](https://discuss.elastic.co/t/how-to-get-count-along-with-parent-in-elastic-search-6/165066/1 "2019-01-21T14:35:33Z")

</div>

Hi,  
I am using elastic search 6.3.0 and  
I have set up a parent-child relationship and I would like to be able to  
return a list of parents but also include the count of children per parent.  
Is there an easy way to do this at the moment?

Thank you

---

<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:** [February 18, 2019, 2:45pm UTC](https://discuss.elastic.co/t/how-to-get-count-along-with-parent-in-elastic-search-6/165066/2 "2019-02-18T14:45:25Z")

</div>

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