# Allowing child document to choose parent type at index time?

**URL:** https://discuss.elastic.co/t/allowing-child-document-to-choose-parent-type-at-index-time/52978
**Category:** Elasticsearch
**Created:** [June 16, 2016, 10:54am UTC](https://discuss.elastic.co/t/allowing-child-document-to-choose-parent-type-at-index-time/52978 "2016-06-16T10:54:52Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Mohannad\_Saeed](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@Mohannad\_Saeed](https://discuss.elastic.co/u/Mohannad_Saeed)
#### Post date: [June 16, 2016, 10:54am UTC](https://discuss.elastic.co/t/allowing-child-document-to-choose-parent-type-at-index-time/52978/1 "2016-06-16T10:54:52Z")

</div>

Greetings,

I am not asking how to have multiple parents for a single child.  
Rather, I am asking how to associate a child document to a parent that can be either of type X, Y, or Z? So still a single parent for the child document but chosen from multiple types at index time.

Is this possible at all?

Thanks!

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [June 16, 2016, 12:58pm UTC](https://discuss.elastic.co/t/allowing-child-document-to-choose-parent-type-at-index-time/52978/2 "2016-06-16T12:58:47Z")

</div>

Hey,

as you have to configure the parent in the mapping, you can only configure one type as being the parent.

--Alex

---

<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 5, 2017, 10:43pm UTC](https://discuss.elastic.co/t/allowing-child-document-to-choose-parent-type-at-index-time/52978/3 "2017-07-05T22:43:14Z")

</div>


