简体   繁体   English

跨Elasticsearch集群更改索引模板

[英]Change Index Template Across Elasticsearch Cluster

I'm running ES cluster with multiple on AWS. 我在AWS上运行多个ES集群。 The cluster is behind an ELB that is fed by logstash. 群集位于由logstash填充的ELB的后面。 I've tested a new mapping template in a sandbox cluster, but with only one node. 我已经在沙盒群集中测试了一个新的映射模板,但是只有一个节点。

I've read over these two articles: 我已经阅读了这两篇文章:

https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html https://www.elastic.co/guide/zh-CN/elasticsearch/reference/current/indices-templates.html

https://www.elastic.co/blog/changing-mapping-with-zero-downtime https://www.elastic.co/blog/changing-mapping-with-zero-downtime

When changing the template does each node need to have an updated copy? 更改模板时,每个节点是否需要更新的副本? Can the new template be fed to the master and then it will share the template? 可以将新模板提供给主模板,然后将其共享模板吗?

You can add/update your template using the _template endpoint and all master-eligible nodes will record it. 您可以使用_template端点添加/更新模板,所有符合主条件的节点都将记录该模板。

However, if you decide to store that template within a file (in the config/templates folder), then you have to store that file on all master-eligible nodes. 但是,如果您决定将该模板存储在文件中 (位于config/templates文件夹中),则必须将该文件存储在所有符合主机资格的节点上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM