When I create the following alias, it maps currently available indexes like apps-2019.09.11, apps-2019.09.12
curl -XPOST 'localhost:9200/_aliases' -H 'Content-Type: application/json' -d'
{
"actions" : [
{ "add" : { "index" : "apps*", "alias" : "backend_apps" } }
]
}
'
-XGET "http://localhost:9200/_cat/aliases"
java_apps apps-2019.09.11 - - -
java_apps apps-2019.09.12 - - -
When the new index gets created e.g. apps-2019.09.13
, the alias doesn't map to it automatically.
So, if I run the above POST query the second time, it solves the problem.
Question: is there any option to make alias gets mapped automatically to newly created indexes based on pattern apps*
I obviously could do this via script/cron/daemonset, but wondering if there is a native option.
Thank you in advance!