Hi.
I'm trying to automate the process of schema update and after reading the docs I decided to use the approach with aliases and reindex API.
Everything was fine when I added for example new analysers or new fields. Things has gone bad when I tried to change a type of an existing field.
Here is what I do (I'm skipping some not important details):
- I have an index with alias attached
- I create new index
- I perform reindex from the current index to the new index
- I switch the alias
In the case, where new mappings contain different type for an existing field, I get an error:
{"error":{"root_cause": [{"type":"illegal_argument_exception","reason":"mapper [fieldName] of different type, current_type [keyword], merged_type ,"type":"illegal_argument_exception","reason":"mapper [fieldName] of different type, current_type [keyword], merged_type [date]"},"status":400}
Is there any way, to ignore such confict, so the reindex API will just skip such conflicted data?
Currently it's breaking the process, so I end up with an old index not being updated.