# Unable to write parent and child documents from same map-reduce job

**URL:** <https://discuss.elastic.co/t/unable-to-write-parent-and-child-documents-from-same-map-reduce-job/19597>\
**Category:** Elasticsearch\
**Created:** [September 3, 2014, 5:07pm UTC](https://discuss.elastic.co/t/unable-to-write-parent-and-child-documents-from-same-map-reduce-job/19597 "2014-09-03T17:07:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Kunkle](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeff_kunkle/32/1301_2.png) [@Jeff\_Kunkle](https://discuss.elastic.co/u/Jeff_Kunkle)\
**Post date:** [September 3, 2014, 5:07pm UTC](https://discuss.elastic.co/t/unable-to-write-parent-and-child-documents-from-same-map-reduce-job/19597/1 "2014-09-03T17:07:16Z")

</div>

Using elasticsearch-hadoop, I'd like to write a map reduce job where the  
EsOutputFormat writes both child and parent documents. However, it appears  
that it can only write parent or child documents within a single job. To  
write child documents, one needs to set the "es.mapping.parent" property in  
the JobConf, which I believe then messes up writing of the parent  
documents, which obviously don't have a parent. Is there a way to work  
around this?

--  
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/f1404720-8704-4a4d-88ce-654920fdf7e0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f1404720-8704-4a4d-88ce-654920fdf7e0%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/unable-to-write-parent-and-child-documents-from-same-map-reduce-job/19597/2 "2017-07-06T01:04:38Z")

</div>

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


