Reputation: 154
We are preparing to upgrade Elastic Search 1.7 to a newer version.
What we should be caring of before starting the upgrade, also is there any suggestions about the version that we should upgrade to it?
Is it technically possible to upgrade from 1.7 to 5.x or we should upgrade to 2.x first?
Upvotes: 0
Views: 198
Reputation: 1029
Having been through this recently, there are two approaches to Elasticsearch upgrades when you're far behind:
Take a leap and do it all at once, or take it one major version at a time.
The latter is probably safer, but slower. It's possible due to Elasticsearch's very nice compatibility policy: any breaking changes in major version X will throw a deprecation warning in version X-1, but will continue to work.
Personally I'd recommend taking it one version at a time, and since that approach is more complicated, I'll describe it in a bit more detail.
This allows for a pattern like the following:
Here's some general principles that are worth considering
Yes, the docs say that, for example, you can load an index created in ES 1.7 into ES2, but I would recommend against it. In my experience, some queries will actually be slower when you do this, even though newer versions of Elasticsearch usually at least maintain if not improve performance.
In general, each update will require some level of change to your Elasticsearch schema mapping, and some changes to your query structure. The query structure is usually much easier to iterate on, since it's in your application code and can be improved or rolled back at any time. Schema changes are harder, since they generally require you to create a new index from scratch and migrate over somehow.
However, just keep in mind that both types of changes exist. Simply adjusting your Elasticsearch schema until it works on the new version, and failing to update your queries can lead to surprises!
Now finally, here's a rough list of the major pain points that I recall from each upgrade
Upvotes: 1