# Index parent document with #?child=#

**URL:** <https://discuss.elastic.co/t/index-parent-document-with-child/13240>\
**Category:** Elasticsearch\
**Created:** [August 16, 2013, 12:30pm UTC](https://discuss.elastic.co/t/index-parent-document-with-child/13240 "2013-08-16T12:30:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maarten\_Roosendaal](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@Maarten\_Roosendaal](https://discuss.elastic.co/u/Maarten_Roosendaal)\
**Post date:** [August 16, 2013, 12:30pm UTC](https://discuss.elastic.co/t/index-parent-document-with-child/13240/1 "2013-08-16T12:30:39Z")

</div>

Hi,

I was wondering if it is possible to index a parent document with a  
reference to a child document? All the examples are about the other way  
around but i already have an index with all the children and need to index  
the parents.

something like /localhost:9200/products/author/1?child=1, i've tried it but  
it doesn't seem to work. I've added the parent-child mapping and that seems  
fine when i retrieve the mapping of the products-index.

Thanks,  
Maarten

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:20am UTC](https://discuss.elastic.co/t/index-parent-document-with-child/13240/2 "2017-07-06T02:20:53Z")

</div>


