简体   繁体   English

如何将Elasticsearch 1.x重新索引或迁移到5.x数据

[英]How to reindex or migrate elasticsearch 1.x to 5.x data

I have copy of old data ie Elasticsearch 1.x, I want to migrate or reindex in Elasticsearch 5.x. 我有旧数据的副本,即Elasticsearch 1.x,我想在Elasticsearch 5.x中迁移或重建索引。

what are the methods and better way to do this ? 有什么方法和更好的方法可以做到这一点?

Elasticsearch is able to use indices created in the previous major version only. Elasticsearch仅能使用在先前的主版本中创建的索引。 For instance, Elasticsearch 5.x can use indices created in Elasticsearch 2.x, but not those created in Elasticsearch 1.x or before. 例如,Elasticsearch 5.x可以使用在Elasticsearch 2.x中创建的索引,但不能使用在Elasticsearch 1.x或更早版本中创建的索引。

If you are running an Elasticsearch 2.x cluster which contains indices that were created before 2.x, you will either need to delete those old indices or to reindex them before upgrading to 5.x. 如果您运行的Elasticsearch 2.x集群包含在2.x之前创建的索引,则在升级到5.x之前,您将需要删除那些旧索引或重新索引它们。 See Reindex in place. 请参阅重新索引。

If you are running an Elasticsearch 1.x cluster, you have two options: 如果您正在运行Elasticsearch 1.x集群,则有两个选择:

First upgrade to Elasticsearch 2.4.x, reindex the old indices, then upgrade to 5.x. 首先升级到Elasticsearch 2.4.x,重新索引旧索引,然后再升级到5.x。

I would recommend to follow official guide from Elasticsearch by looking here - https://www.elastic.co/guide/en/elasticsearch/reference/current/reindex-upgrade.html#reindex-upgrade-remote , which should help you. 我建议通过查看以下网址来遵循Elasticsearch的官方指南-https://www.elastic.co/guide/zh-CN/elasticsearch/reference/current/reindex-upgrade.html#reindex-upgrade-remote,这应该会对您有所帮助。

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

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