Reindex from 2.x to elastic 5.x

Good morning everyone,

I am trying to upgrade elasticsearch with graylog to the newest version. Currently I have the elasticsearch indexes in version 1.7, I can read them from elasticsearch 2.x but I need to reindex to be able to read them in versions 5.x or higher.

For this I am trying to use the reindexing API, but I am getting the following error several times:

"{
“index”: “graylog_2023_re”,
“type”: “message”,
“id”: “f27395d1-92d6-11eb-9a08-525400f612cd”,
“cause”: {
“type”: “mapper_parsing_exception”,
“reason”: “Field [_id] is a metadata field and cannot be added inside a document. Use the index API request parameters.”
},
“status”: 400
},
{
"

Can somebody help me? Thank you.

Welcome to our community! :smiley:

What is the request that you passing to Elasticsearch?

Hi, Thank you @warkolm

The request I was passing to ElasticSearch are:

curl -H 'Content-Type: application/json' -X POST localhost:9200/_reindex?pretty -d'{
"source": {
"remote": {
"host": "http://RemoteIP:9200"
},
"index": "OriginalName"
},
"dest": {
"index": "NewReindexName"
}
}'

I have seen that the problem may be occurring due to the _id field in the indexes but I don't know what the solution could be.

Thank you very much!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.