I'm currently trying to upgrade our systems to 2.x from 1.x.
Unfortunately our 1.x fields had dots ('.') in them. I've written a program that replaces the dots for a legal character.
My plan was then to snapshot the dotless data and restore to an es 2.x, but that doesn't work. Even though I've modified the data, the snapshot takes the index mappings with it:
{
"error" : {
"root_cause" : [ {
"type" : "snapshot_restore_exception",
"reason" : "[s3incremental:201608011118] cannot restore index [status] because it cannot be upgraded"
} ],
"type" : "snapshot_restore_exception",
"reason" : "[s3incremental:201608011118] cannot restore index [status] because it cannot be upgraded",
"caused_by" : {
"type" : "illegal_state_exception",
"reason" : "unable to upgrade the mappings for the index [status], reason: [Field name [error.cause] cannot contain '.']",
"caused_by" : {
"type" : "mapper_parsing_exception",
"reason" : "Field name [error.cause] cannot contain '.'"
}
}
},
"status" : 500
}
Is there any way of doing a snapshot or restore either without the index mappings, or by somehow mutating the index mappings on the way in so that they don't reference the illegal field names?