Spark writes documents in non-suitable indices

Just for more context: my feeling is you have an index Lifecycle policy in place and I want to check what is the write alias you're supposed to write to.

If we call GET sales*/_ilm/explain I wouldn't be surprised to see some errors.