Change the Elasticsearch Client

The Magento 2.3.5 update adds support for Elasticsearch (ES) 6.8.x and 7.x.x.

Both ES 2.x and 5.x are End of Life and are no longer supported in Magento.

Change the Elasticsearch Client version

If you need to work with Elasticsearch 7.1.x, run the following command:

1
composer require "elasticsearch/elasticsearch:~7.1"

To work with Elasticsearch 6.8.x, run the following command:

1
composer require "elasticsearch/elasticsearch:~6.8"

Then configure Elasticsearch within Magento Admin.