# Performing manual joins where one child has many parents and possibly on different childs

**URL:** <https://discuss.elastic.co/t/performing-manual-joins-where-one-child-has-many-parents-and-possibly-on-different-childs/19647>\
**Category:** Elasticsearch\
**Created:** [September 5, 2014, 3:50pm UTC](https://discuss.elastic.co/t/performing-manual-joins-where-one-child-has-many-parents-and-possibly-on-different-childs/19647 "2014-09-05T15:50:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kazoompa\_3](https://avatars.discourse-cdn.com/v4/letter/k/958977/32.png) [@kazoompa\_3](https://discuss.elastic.co/u/kazoompa_3)\
**Post date:** [September 5, 2014, 3:50pm UTC](https://discuss.elastic.co/t/performing-manual-joins-where-one-child-has-many-parents-and-possibly-on-different-childs/19647/1 "2014-09-05T15:50:50Z")

</div>

Hi,

I would like to find the best efficient approach on performing manual  
joins. A little background:

Our documents are updated quite frequently and they are rather large  
(reason why we don't nest them). In addition, one document may be related  
to two or more other documents (may be on different shards). We thought of  
removing the current parent-child filters and perform the joins ourselves  
to provide more flexibility.

Here is on scenario:

VariableQuery -\> StudyQuery -\> NetworkQuery

There are of course IDs that relate each document to the other.

NetworkQuery's IDs are used to refine the StudyQueries which in turns its  
IDs are used to refine the main (root) VariableQuery.

An expert guideline/suggestion/solution will be greatly appreciated,  
Cheers.

--  
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/60701bc4-0ffd-47f7-bddc-e7cbaed35c96%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/60701bc4-0ffd-47f7-bddc-e7cbaed35c96%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:04am UTC](https://discuss.elastic.co/t/performing-manual-joins-where-one-child-has-many-parents-and-possibly-on-different-childs/19647/2 "2017-07-06T01:04:02Z")

</div>

Closed on July 6, 2017, 1:04am UTC


