We use versioned time-based indices at Parse.ly that are roughly of the form v1-foo-2019.03.05.20
(v{version}-{name}-{YYYY}.{MM}.{DD}.{HH}
). Currently, we have a cron job that runs every 30 minutes that creates the next few indices and aliases them without the version (e.g., foo-2019.03.05.20
is added as an alias for v1-foo-2019.03.05.20
). Our write path only writes to the version-less alias.
We would really like to use index templates to handle the alias and index creation, but the problem is that since our write path only writes to version-less aliases, the indices will not get created properly, because they will not match the index patterns (which are version-specific).
In the past, having versioned indices has saved us from disaster when we have added fields with the wrong type to our mappings, so we would like to retain this pattern while also eliminating the need for our custom cron job. Is there anything we could do to allow such a setup?