使用ISM策略时,需要在创建索引期间应用索引策略设置,但是一旦通过策略中某个阶段/阶段所应用的过渡操作创建了新索引,这些设置就会丢失。
例如,具有以下形式的索引:
pattern: msp-* [* => number, in the index template]
alias: msp-*-alias [applied during the index creation]
rollover alias: msp-*-alias
policy: msp-policy-id
具有模板索引模式msp-*
(其中*是数字)会阻止对*可以自动应用的每个值具有过渡别名msp-*-alias。如何解决这种情况?
参考:
Can variables be used in elasticsearch index templates?
https://github.com/elastic/elasticsearch/issues/20367
https://github.com/opendistro-for-elasticsearch/index-management/issues/95
https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/ism.html