简体   繁体   English

我可以在节点/集群上创建ElasticSearch索引,然后稍后更改集群吗?

[英]Can I create an ElasticSearch index on a node/cluster, then change the cluster later?

Can I create an ElasticSearch index on a cluster, let's name it "Cluster 1". 我可以在集群上创建ElasticSearch索引吗,我们将其命名为“集群1”。

And then suppose there's another cluster "Cluster 2" I want the node to move to in the future. 然后假设还有另一个群集“群集2”,我希望该节点将来转移到该群集。 Is it possible to just change the cluster name in the future without impacting the data? 将来是否可以仅更改集群名称而不影响数据? It's ok of course if the shards move to other nodes in the cluster, but I just don't want any data loss. 分片移动到群集中的其他节点当然可以,但是我只是不希望任何数据丢失。

Yes, Cluster 2 can pick up indices from a Cluster 1 node, but you have to makes sure that: 是的, Cluster 2可以从Cluster 1节点中获取索引,但是您必须确保:

  1. The data directory on the node from Cluster 1 is properly renamed from ESHOME/data/Cluster 1 to ESHOME/data/Cluster 2 to reflect the new cluster name. Cluster 1上的节点上的数据目录已正确地从ESHOME/data/Cluster 1重命名为ESHOME/data/Cluster 2以反映新的群集名称。

  2. None of the indices that existed on the node from a Cluster 1 already exist in the Cluster 2 . 该节点上存在从索引中没有Cluster 1已经存在于Cluster 2

是的,我相信您可以在其配置中更改es进程(节点)的集群名称,并且数据分片仍将位于新集群中。

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

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