# Find all parents with 0 children

**URL:** <https://discuss.elastic.co/t/find-all-parents-with-0-children/130864>\
**Category:** Elasticsearch\
**Created:** [May 7, 2018, 3:53pm UTC](https://discuss.elastic.co/t/find-all-parents-with-0-children/130864 "2018-05-07T15:53:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bberk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bberk/32/30893_2.png) [@bberk](https://discuss.elastic.co/u/bberk)\
**Post date:** [May 7, 2018, 3:53pm UTC](https://discuss.elastic.co/t/find-all-parents-with-0-children/130864/1 "2018-05-07T15:53:43Z")

</div>

I am running Elasticsearch 5.5 and have an index with 2 types in it (type1 & type2). type1 is a parent to type2.  
I need to find all parent (type1) documents that have exactly ZERO children documents.

---

<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:** [June 4, 2018, 3:53pm UTC](https://discuss.elastic.co/t/find-all-parents-with-0-children/130864/2 "2018-06-04T15:53:53Z")

</div>

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