I'm working on Elastic search to store and retrieve schema less json's. I have created index called "index002", I tried to create document with two different _type. Both having different json and some keys are still exists with different datatype.
ERROR:root:b'{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"failed to parse [Type]"}],"type":"mapper_parsing_exception","reason":"failed to parse [Type]","caused_by":{"type":"number_format_exception","reason":"For input string: \"Open\""}},"status":400}'
Can i support any datatype for the field "Type"? Because the data could be in any datatype for my case. How could i index a document with different types?
Thanks for your answer. I'm in the need of storing different JSON data in the same _type. Because Im using schema less mongoDB as my database system earlier. Now I need to store some data's from mongo to elastic search via REST API.
In Mongo, we can store different JSON data in same collection as documents. Im trying to achieve the same here in ES.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.