# Has-child query question

**URL:** <https://discuss.elastic.co/t/has-child-query-question/16792>\
**Category:** Elasticsearch\
**Created:** [April 3, 2014, 2:38pm UTC](https://discuss.elastic.co/t/has-child-query-question/16792 "2014-04-03T14:38:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tzahi](https://avatars.discourse-cdn.com/v4/letter/t/b77776/32.png) [@Tzahi](https://discuss.elastic.co/u/Tzahi)\
**Post date:** [April 3, 2014, 2:38pm UTC](https://discuss.elastic.co/t/has-child-query-question/16792/1 "2014-04-03T14:38:09Z")

</div>

Hi All,  
When my query contains a has-child query - can I get the child documents as  
part of their parent documents?

Thanks

--  
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/d38d7f4f-4fa2-4d7d-be19-00adad78d194%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d38d7f4f-4fa2-4d7d-be19-00adad78d194%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Binh\_Ly\_2](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@Binh\_Ly\_2](https://discuss.elastic.co/u/Binh_Ly_2)\
**Post date:** [April 3, 2014, 10:04pm UTC](https://discuss.elastic.co/t/has-child-query-question/16792/2 "2014-04-03T22:04:33Z")

</div>

Unfortunately no. If you can afford to do nested objects instead, then you  
get back the whole doc with children.

--  
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/dd44d380-a68a-4f06-8829-c38cffea62b9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/dd44d380-a68a-4f06-8829-c38cffea62b9%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Tzahi](https://avatars.discourse-cdn.com/v4/letter/t/b77776/32.png) [@Tzahi](https://discuss.elastic.co/u/Tzahi)\
**Post date:** [April 3, 2014, 10:44pm UTC](https://discuss.elastic.co/t/has-child-query-question/16792/3 "2014-04-03T22:44:00Z")

</div>

Thanks so much.

I have many small child documents (well - actually records) for each parent

- so nested objects will cause all child documents to re-index with each  
new child.

So the only difference between a has\_child query and filter is that the  
query allows you to influence the score?

Again thanks – will need to scratch my head quite heavily L

On Friday, April 4, 2014 1:04:33 AM UTC+3, Binh Ly wrote:

> Unfortunately no. If you can afford to do nested objects instead, then you  
> get back the whole doc with children.

--  
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/53923937-4e4d-4d78-813b-87585b0c3a35%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/53923937-4e4d-4d78-813b-87585b0c3a35%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, 1:38am UTC](https://discuss.elastic.co/t/has-child-query-question/16792/4 "2017-07-06T01:38:19Z")

</div>


