# Get parent and child objects in 1 query?

**URL:** <https://discuss.elastic.co/t/get-parent-and-child-objects-in-1-query/19998>\
**Category:** Elasticsearch\
**Created:** [September 29, 2014, 8:54am UTC](https://discuss.elastic.co/t/get-parent-and-child-objects-in-1-query/19998 "2014-09-29T08:54:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mangas\_Code](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mangas_code/32/1246_2.png) [@Mangas\_Code](https://discuss.elastic.co/u/Mangas_Code)\
**Post date:** [September 29, 2014, 8:54am UTC](https://discuss.elastic.co/t/get-parent-and-child-objects-in-1-query/19998/1 "2014-09-29T08:54:18Z")

</div>

Hey all,

I am new with ES and I wonder if this is possible:

I have a user and a video type.

In my RDB structure the user and video table has many to many relation,  
meaning a user can have more videos and a video can have more users.

And still am figuring how to make a local join (any ideas?)

But Now I have to make the video as parent and I added the user as child  
but with no parent id as reference but as type parent is video.

Is there a way to get all the users and the video data in 1 search?

Best regards,

M

--  
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/2ef6fea7-b021-4360-a5b5-8b069b3e8ab2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2ef6fea7-b021-4360-a5b5-8b069b3e8ab2%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:59am UTC](https://discuss.elastic.co/t/get-parent-and-child-objects-in-1-query/19998/2 "2017-07-06T00:59:22Z")

</div>

Closed on July 6, 2017, 12:59am UTC


