[英]Elasticsearch rename index
I have an index named "products" and another one named "products_temp".我有一个名为“products”的索引和另一个名为“products_temp”的索引。 I want to fill the "products_temp" with new products then delete the "products" index and rename the "products_temp" index to "products".
我想用新产品填充“products_temp”,然后删除“products”索引并将“products_temp”索引重命名为“products”。 Is this possible in Elasticsearch?
这在 Elasticsearch 中可行吗? If it is, what's the recommended approach?
如果是,推荐的方法是什么?
I have to repeat this "products resync" process every day once.我必须每天重复这个“产品重新同步”过程一次。
Renaming indices is not possible.无法重命名索引。 Recommended way is to use
alias
and point that to whatever index you want.推荐的方法是使用
alias
并将其指向您想要的任何索引。
Refer: How to rename indices参考:如何重命名索引
it is fully convertible, in your beat.yml configuration on Elastic output you add:它是完全可转换的,在您在 Elastic 输出上的 beat.yml 配置中添加:
setup.ilm.enabled: false
output.elasticsearch.index: "customname -% {[agent.version]} -% {+ yyyy.MM.dd}"
setup.template.name: "customname"
setup.template.pattern: "customname- *"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.