百度智能云

All Product Document

          Elasticsearch

          Upgrade Between Individual Version of the Es

          There are three ways to upgrade between different versions of the "Es":

          • Replace the binary package. Download the new version of the "es" binary package, replace the existing package, and start. There is a risk for this method, that if an error occurs during upgrade, it cannot roll back.
          • "Backup restore". Back up the "es" cluster data to shared storage such as BOS, HDFS, and NFS and then build a new cluster with the new version binary package. Then backed up "restore" data on the new cluster. In most cases, recommend you to use this method.
          • reindex. You can perform the upgrade between any versions. But because of the original cluster data read out one by one and then inserted into the new cluster, the performance is not good enough and takes a long time. The reindex function starts from version 2.x.

          The main versions of "Es" used in production include versions 1.7, 2.4, 5.5, and 6.5. The following gives descriptions of the upgrade methods between different versions.

          • In the case of version 1.7 -> 2.4, you can replace the "jar" package by "backup restore" in normal conditions. However, it is found that in some cases it cannot be upgraded, including the following situations: 1. The field name contains special characters. 2. The "doc value" setting of the same field in different types is different. In this case, you can upgrade only after deleting these abnormal "indexes".
          • In the case of version 1.7 --> 5.5, the upgrade cannot get done directly. Version 1.7 must be upgraded to 2.4 and then from 2.4 reindex to 5.5.
          • In the case of version 1.7 --> 6.5, the upgrade cannot get done directly. Version 1.7 must be upgraded to 2.4 and then from 2.4 reindex to 6.5.
          • In the case of version 2.4 --> 5.5, the upgrade cannot get done by "backup restore" or replacing the binary system.
          • In the case of version 2.4 --> 6.5, the upgrade gets done by the reindex.
          • In the case of version 5.5 --> 6.5, the upgrade can be performed by "backup restore" or replacing the binary system.

          Sum up one principle from the above descriptions:

          • The upgrade with only 1 version number difference between main versions from X to X+1 (e.g., from 1.x to 2.x, or 5.x to 6.x) is possible by "backup restore" or replacing the binary "jar" package.
          • The upgrade with version difference above 1 (e.g., from 1.x to 5.x) between main versions cannot be realized by backup restore or replacing the binary system, but by "reindex".
          • After upgrading from version X to version X+1 by backup restore or replacing the binary "jar" package, you cannot upgrade to version X+2 in the same way, but by "reindex".

          For detailed constraint information of upgrade, please see Es Official Website.

          Previous
          Configure the IK-Analyzer-Thesaurus
          Next
          NLP Chinese Word Segmentation Plugin