# Possible to pull the parent + child in same query?

**URL:** https://discuss.elastic.co/t/possible-to-pull-the-parent-child-in-same-query/7687
**Category:** Elasticsearch
**Created:** [May 14, 2012, 2:56pm UTC](https://discuss.elastic.co/t/possible-to-pull-the-parent-child-in-same-query/7687 "2012-05-14T14:56:28Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Rick](https://avatars.discourse-cdn.com/v4/letter/r/9f8e36/32.png) [@Rick](https://discuss.elastic.co/u/Rick)
#### Post date: [May 14, 2012, 2:56pm UTC](https://discuss.elastic.co/t/possible-to-pull-the-parent-child-in-same-query/7687/1 "2012-05-14T14:56:28Z")

</div>

Hi,

In trying to experiment with parent + child, I'm not yet seeing a way to pull both the parent and children documents with the same query.

Both has\_child and top\_children seem to pull the parent, but not both the parent + children.

In this case there is a 1:1 between parent and child. The "top\_children" documentation says "The top\_children query runs the child query with an estimated hits size, and out of the hit docs, aggregates it into parent docs..." yet I don't see the child come back from this query.

Am I missing something blatantly obvious?? Is there a full decent example/gist that shows how this works??

THANKS!  
Rick

---

<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, 3:28am UTC](https://discuss.elastic.co/t/possible-to-pull-the-parent-child-in-same-query/7687/2 "2017-07-06T03:28:57Z")

</div>


