I have a dataset stored in ElasticSearch, only for searching purposes (the source of truth is external). Each index have an associated schema and there are associated queries.
From time to time, the structure changes from time to time the structure change, doing that, I update all the indexes, by dropping them and recreating them from the source of truth (with the new schema definition). This update takes place in the background, so code still fetch old format data. To mitigrate that, I have a layer which deal with data format compatibility issues.
The issue is that the requests target the new data schema, breaking on the old dataset. How do you handle data migration at this level?