# Can we have Multiple Parent - Single Child Relation in elastic search

**URL:** <https://discuss.elastic.co/t/can-we-have-multiple-parent-single-child-relation-in-elastic-search/172768>\
**Category:** Elasticsearch\
**Created:** [March 18, 2019, 12:22pm UTC](https://discuss.elastic.co/t/can-we-have-multiple-parent-single-child-relation-in-elastic-search/172768 "2019-03-18T12:22:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharoncek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharoncek/32/38937_2.png) [@sharoncek](https://discuss.elastic.co/u/sharoncek)\
**Post date:** [March 18, 2019, 12:22pm UTC](https://discuss.elastic.co/t/can-we-have-multiple-parent-single-child-relation-in-elastic-search/172768/1 "2019-03-18T12:22:41Z")

</div>

Hi @dadoonet and All,

Please help me on below.

On a long search, I have found in elastic search(I am using V6.5.4) we have the option for Single Parent - Multiple Children mapping.

//Code Start  
PUT my\_index124  
{  
"mappings": {  
"\_doc": {  
"properties": {  
"my\_join\_field": {  
"type": "join",  
"relations": {  
"question": ["answer", "comment"]  
}  
}  
}  
}  
}  
}  
//Code End

My question is : Do we have a reverse option - Multiple Parent - Single Child.

I have some static data for example School, Teacher, ClassRoom, BloodGroup etc.  
And we need to use these in the child - student data.  
Initially, I created index like for each student document added all these data in the same document. But some classroom names changed. Now updating all students with respective class will be a big task.

This type of name changes will happen in the future also. I think if we have multiple parents - single child relation, we can set all static items as parent and we can use ids of these in child and updating names will be easy.

Please advise on this.

Regards,  
Sharon A S

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 18, 2019, 12:56pm UTC](https://discuss.elastic.co/t/can-we-have-multiple-parent-single-child-relation-in-elastic-search/172768/2 "2019-03-18T12:56:55Z")

</div>

No, that is not possible. I would recommend looking into denormalizing and storing the data with each parent.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 18, 2019, 1:01pm UTC](https://discuss.elastic.co/t/can-we-have-multiple-parent-single-child-relation-in-elastic-search/172768/3 "2019-03-18T13:01:52Z")

</div>

Welcome to this forum. Please don't ping people who are not yet part of the discussion. Thanks.

---

<div class="post-metadata">

**Author:** ![sharoncek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharoncek/32/38937_2.png) [@sharoncek](https://discuss.elastic.co/u/sharoncek)\
**Post date:** [March 19, 2019, 6:23am UTC](https://discuss.elastic.co/t/can-we-have-multiple-parent-single-child-relation-in-elastic-search/172768/4 "2019-03-19T06:23:20Z")

</div>

OK @dadoonet, I found many of your comments on related topics. That is why I added your name.

Could you please add your comments here, are you agree with [Christian\_Dahlqvist]

---

<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:** [April 16, 2019, 6:23am UTC](https://discuss.elastic.co/t/can-we-have-multiple-parent-single-child-relation-in-elastic-search/172768/5 "2019-04-16T06:23:21Z")

</div>

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