I want to change an ElasticSearch mapped property from text to ip, but they are incompatible types.
I know the accepted answer is to:
- create a new index with the correct mapping;
- run the
_reindexAPI to copy the data over; - make a cup of coffee;
- delete the original index;
- create an alias from the original to the new index.
However, I'm dealing with a half-a-billion records in a 363GB index, with potentially hundreds of thousands of new records being written to it every day. The process above would involve at least some down-time during the process of deleting the old index and creating the new alias, and there would be lost records in the time between the reindexing completing and the next step. (And the reindexing process would take hours, if not days.) It would be much better to do the transform in-place, perhaps creating a new field and copying the old index over? Any ideas?