How to get client compatibility right with different major elasticsearch versions?

Client libraries are meant to be used against the same major version of the server they are using, but how do you deal with upgrades to a new major version?
You can usually load both the old and the new version of the same library, but when defining the elasticsearch nodes, there is no way to tell which ones are on what version.
You may have to keep compatibility with an older version on a production environment, or may be dealing with very large clusters that take a long time to do the upgrade.

So how is this generally done without breaking backwards compatibility?

As long as you are not using any deprecated features, you should be able to use a 6.8 REST client against a 7.x cluster. The docs recommend upgrading clients last.

In some cases the high-level REST client may automatically use deprecated functionality; in those cases you'll need to drop down to the low-level REST client instead.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.