I have a dataset stored in ElasticSearch, only for searching purposes (the source of truth is external). Each index has an associated schema and there are associated queries.
From time to time, the structure changes. When doing that, I update all the indexes by dropping and recreating them from the source of truth (with the new schema definition). This update takes place in the background, so code still fetches old format data. To mitigate that, I have a layer which deals 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?