Opensearch 1.3 running on AWS
Hello,
We have recently spun up and are using opensearch on AWS. The indexes rotate daily then move to warm and finally delete using ISM. Everything is working fine but I want to change the names.
Currently the indexes follow a naming structure like:
index-000001
index-000002
index-000003
and so on. I would like to add the date to naming like
index-2022.11.28-000001
index-2022.11.29-000002
index-2022.11.30-000003
which I believe would be just creating an index like:
PUT /%3Cindex-%7Bnow%2Fd%7D-000001%3E
The issue I am having is how to apply that with ISM running. I see in the index settings after I use the above put
"provided_name" : "<index-{now/d}-000001>"
Can I somehow add that to current template so the next index creation uses that naming?
Otherwise it seems I have to do a series of steps something like:
- Create the new date math name index
- Then switch the
is_write_index
alias - But then the old index with the incrementing number fails on daily rollover with:
"Missing alias or not the write index when rollover"
which makes sense its not thewrite index
anymore - So I guess I could re-index that into the new index I created.
But if i could just change the template so the new daily index picks up the name it would be much easier and safer.
Thanks!