简体   繁体   English

Elasticsearch版本升级以及是否需要重新索引索引

[英]Elasticsearch version upgrade and whether the index needs to be reindexed

We are using Elasticsearch 5.6 hosted on AWS ElasticSearch service and using Rails searchkick gem (v2.5). 我们正在使用AWS ElasticSearch服务上托管的Elasticsearch 5.6和Rails searchkick gem(v2.5)。 We are planning to migrate to Elasticsearch 7 and searchkick v4 at some point to make use of the split index functionality. 我们计划在某个时候迁移到Elasticsearch 7和searchkick v4,以利用拆分索引功能。

I am checking whether I would need to rebuild the whole index, it isn't too hard to do for us, maybe over a day. 我正在检查是否需要重建整个索引,这也许对我们来说一天也不难。

Over here: https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html Here is a couple of conflicting pieces of information I see on this doc page: 在这里: https : //www.elastic.co/guide/zh-CN/elasticsearch/reference/current/setup-upgrade.html这是我在此文档页面上看到的一些相互矛盾的信息:

" Elasticsearch can usually be upgraded using a Rolling upgrade process so upgrading does not interrupt service. Rolling upgrades are supported: • Between minor versions “通常可以使用滚动升级过程来升级Elasticsearch,因此升级不会中断服务。支持滚动升级:•次要版本之间

• From 5.6 to 6.8 •从5.6到6.8

• From 6.8 to 7.3.2" •从6.8到7.3.2“

... ...

"Elasticsearch can read indices created in the previous major version. If you have indices created in 5.x or before, you must reindex or delete them before upgrading to 7.3.2. " “ Elasticsearch可以读取在以前的主要版本中创建的索引。如果您具有在5.x或更早版本中创建的索引,则在升级到7.3.2之前必须重新索引或删除它们。”

If one can do a rolling upgrade from 5.6 to 6.8, and from 6.8 to 7.3.2, and elasticsearch can read indices created in the previous major versions, then is the next statement you must reindex from 5.x to 7.3.2 true? 如果可以从5.6到6.8以及从6.8到7.3.2进行滚动升级,并且elasticsearch可以读取在以前的主要版本中创建的索引,那么下一条语句是否必须从5.x重新索引为7.3.2正确?

No. 没有。

I recommend this solution: 我推荐此解决方案:

first you should build a new parallel 7.3 cluster. 首先,您应该构建一个新的并行7.3集群。 then "remote reindex" data from 5.6 to 7.3. 然后将数据从5.6“远程重新索引”到7.3。 https://www.elastic.co/guide/en/elasticsearch/reference/current/reindex-upgrade-remote.html https://www.elastic.co/guide/en/elasticsearch/reference/current/reindex-upgrade-remote.html

the other solution: 另一种解决方案:

you can rolling upgrade to 6.5 then "reindex in place" the indices from 5.6 to 6.5. 您可以将升级滚动到6.5,然后将索引从5.6“适当地重新索引”到6.5。 in that moment you have two option: 在那一刻,您有两种选择:

  1. rolling upgrade to 7.3 and use 6.5 indices (Lucene 7) and miss some new Lucene 8 feature. 滚动升级到7.3并使用6.5索引(Lucene 7),错过了一些新的Lucene 8功能。
  2. rolling upgrade to 7.3 and again "reindex in place" the indices from 6.5 to 7.3 (Lucene 8). 滚动升级到7.3,然后再次将索引从6.5“重新索引”到7.3(Lucene 8)。 with means that you reindex your data two times. with表示您两次对数据重新编制索引。

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

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