Hello,
I have an Elasticsearch index where fields are configured by clients (indirectly) i.e., the clients configure the datatype for these fields through an interface and then I have a workflow which creates the actual mapping for these fields in the index. The clients then index data and perform queries.
If a client wishes to change the field datatype for a given field, I would have to re-index all documents to a new index to change the datatype for the field. This is fine if performed infrequently, however if some client changes the datatype too many times, too many reindexing operations are not desirable, given the fact that the index contains a lot of documents from other clients as well (greater than 30 million and growing) and I feel this would affect the cluster negatively.
Is there a way where I can solve this without having to re-index frequently? Would field aliases work here? Eg: I create a field alias for a field that client wishes to create. Every time client changes the datatype, I would just create a new field and point the field alias to the new field.
Any other workarounds/suggestions are also welcome.
Thanks,
Raonic