elastic / elasticsearch-php

Official PHP client for Elasticsearch.
https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html
MIT License
5.25k stars 963 forks source link

Inquiries about version use #1397

Closed BinZhiZhu closed 4 months ago

BinZhiZhu commented 4 months ago

Hello, may I ask a question? At present, my application uses version 6.5 of elasticsearch-php in es6.x version, and now the application expects to access the new es7.x version. Will there be any problem if I directly upgrade elasticsearch-php to 7.x? Will this version be backward compatible? If my application has two versions of read and write requirements, which version do I need to upgrade?

ezimuel commented 4 months ago

In order to choose the elasticsearch-php version client you need to start from the Elasticsearch Server (ES) version. If you have ES ver. 6.x you should use the 6.x client. The 7.x client is not backward compatible with 6.x.

pquentin commented 4 months ago

For more details, you can also see the "Compatibility" section of the README: https://github.com/elastic/elasticsearch-php?tab=readme-ov-file#compatibility. Since clients are forward compatible, you should first upgrade Elasticsearch to 7.17, and then the client.