Elasticsearch python client compatibility

Hi,

I need to write a python script that can be run against both elasticsearch 6 and elasticsearch 7 clusters. Which version of the python elasticsearch client would be recommended for this purpose?

Thanks,
Bruce

You can't use one client to talk to both version as there are breaking changes and API changes from 6.X to 7.X.

You will need to use the current one, named elasticsearch and the client to version 6, available as elasticsearch6.

pip install elasticsearch
pip install elasticsearch6

For more information about compatibility you can check the documentation.

Thanks, Leandro. That makes sense. I know that logstash v6.8 and beats v6.8 are still compatible with v7 clusters so I was wondering if there was anything similar with the python client.

One question, if we go down the road of using the elasticsearch package for elasticsearch v7 clusters and elasticsearch6 for the v6 clusters, what happens when we upgrade the v6 clusters? We have to make sure the python clients are upgraded at exactly the same time?

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