We are currently using Functionbeat to create our templates, and yesterday we started seeing errors. Looking at the index's that were affected, it appears someone had create a custom template, which caused the errors. So I put the index back to using the original template, and now when I go to reindex the old index, to use the updated template, it is complaining about the following error.
{
"index": "is-fb-2020.01.29-000235-tmp",
"type": "_doc",
"id": "cTiX8W8BNtz7_4jyhWdW",
"cause": {
"type": "mapper_parsing_exception",
"reason": "object mapping for [error] tried to parse field [error] as object, but found a concrete value"
},
"status": 400
}
]
I understand the data inside the index, is of type string, and not object. Which is why it wont index, but my question is, how can I make it index, or change the data to be Object, without losing the index?
Just to add a note, all new shards use the updated template are working as expected, its just 4 shards that are still causing issues due to using the old template.
See quick solution is to use ignore_malformed in the mapping so a document gets indexed. However if you are reindexing into a new index, what prevents you from fixing the mapping in that index. I might be missing something there... also if the initial structure is wrong, you can use a script to fix the document structure and move that string based error field somewhere else and then you would end up with clean, searchable data.
Hey, how do I create a destination index with the new mapping? When I updated the index to use the new template, I forced the index to roll_over, and confirmed all new shards worked as expected, I just have these 4 shards, that are still using the old template, that are not working.
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.