I'm upgrading our ES cluster from 1.6.1 to 2.1.2, we have spun up new cluster with ES 2.1.2
I have reindexed documents on ES 1.6.1 so that it passes all the checks on ES migration plugin. Now when I create a snapshot on ES 1.6.1 and try to restore it on 2.1.2 it throws an error
{"error":{"root_cause":[{"type":"snapshot_restore_exception","reason":"[stage-05-2016:05-03_1215] cannot restore index [stage-index-1] because it cannot be upgraded"}],"type":"snapshot_restore_exception","reason":"[stage-05-2016:05-03_1215] cannot restore index [stage-index-1] because it cannot be upgraded","caused_by":{"type":"illegal_state_exception","reason":"unable to upgrade the mappings for the index [stage-index-1], reason: [Mapper for [_id] conflicts with existing mapping in other types:\n[mapper [_id] has different [index] values]]","caused_by":{"type":"illegal_argument_exception","reason":"Mapper for [_id] conflicts with existing mapping in other types:\n[mapper [_id] has different [index] values]"}}},"status":500}
I believe this is because of .percolator type document which indexes _id by default in ES 1.6.1 even though if you don't specify explicitly in the mapping. I don't know if this has anything to do with the .percolator type documents.
Note: Snapshot and Restore works perfectly fine if I remove .percolator type mapping.
Thanks for the reply @dadoonet
I have filed an issue: https://github.com/elastic/elasticsearch-migration/issues/56
But it still doesn't seem to solve the problem, even though I create a mapping for .percolator type without _id field on ES 1.6.1; elasticsearch creates one.
For example:
My .percolator mapping
Note the _id being created in the mapping.
So my guess is because _id is created by default for .percolator documents in earlier versions it is preventing me to restore snapshot to ES 2.1.2 version.
Thanks for help.
We have fixed this by doing Snapshot & Restore without .percolator documents and wrote a script to manually migrate those documents so that we can at-least go ahead and upgrade elasticsearch.
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.