# Exporting Data From MongoDB to Elastic Search

**URL:** <https://discuss.elastic.co/t/exporting-data-from-mongodb-to-elastic-search/19638>\
**Category:** Elasticsearch\
**Created:** [September 5, 2014, 8:22am UTC](https://discuss.elastic.co/t/exporting-data-from-mongodb-to-elastic-search/19638 "2014-09-05T08:22:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mudgilgaurav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mudgilgaurav/32/25163_2.png) [@mudgilgaurav](https://discuss.elastic.co/u/mudgilgaurav)\
**Post date:** [September 5, 2014, 8:22am UTC](https://discuss.elastic.co/t/exporting-data-from-mongodb-to-elastic-search/19638/1 "2014-09-05T08:22:25Z")

</div>

Hi All,

I am importing my MongoDB data on elasticsearch by using elaster plugin  
written in node.js. My defined mapping not working for nested type data.  
Please check sample document in-line

{ "\_id" : ObjectId("5406a47970b17246b9a293e1"), "cd" : 1409721465, "i" : [  
{ "\_id" : ObjectId("50f693d17deed44cf000007f"), "st" : "seo-title", "ti" :  
"title", "n" : "categoryname", "cst" : "category-seotitle", "r" : null, "c"  
: null }, { "\_id" : ObjectId("50f693d17deed44cf000007f"), "st" :  
"seo-title", "ti" : "title", "n" : "categoryname", "cst" :  
"category-seotitle", "r" : null, "c" : null }, { "\_id" :  
ObjectId("50f693d17deed44cf000007f"), "st" : "seo-title", "ti" : "title",  
"n" : "categoryname", "cst" : "category-seotitle", "r" : null, "c" : null }  
], "u" : { "\_id" : ObjectId("50ce4f79edaffd69e40ee010"), "n" : "Richa Sen",  
"st" : "richasen", "id" : "d8mzxlp9ekn323l6jg5s8tly1" }, "wat" : 1, "wct" :  
1 }

Please check attached index.js file which describes configuration for  
elaster as well as mapping defined. When I execute elaster plugin to export  
data it says

{ [Error: MapperParsingException[object mapping for [collection] tried to  
parse as object, but got EOF, has a concrete value been provided to it?]]  
message: 'MapperParsingException[object mapping for [collection] tried to  
parse as object, but got EOF, has a concrete value been provided to it?]' }

Note - Value for "i" could be [] (blank array) for some documents but in  
generate it would have structure like explained above.

Any help or suggestion would be greatly appreciated.

Thanks

--  
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/5f7c382b-03cb-44ca-99fa-7f0bf85c6846%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5f7c382b-03cb-44ca-99fa-7f0bf85c6846%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/exporting-data-from-mongodb-to-elastic-search/19638/2 "2017-07-06T01:04:11Z")

</div>


