Question

I was using ElasticSearch in my old server and then I migrate the server for a new one that it's not using it anymore, so I'm receiving this issue message below.

ElasticSearch issue

Exception #0 (Elasticsearch\Common\Exceptions\NoNodesAvailableException): No alive nodes found in your cluster

I could I change the search engine to the default using terminal?

Was it helpful?

Solution

⚠️ Since Magento 2.4, ElasticSearch is required and MySQL is not supported as a search engine anymore.

You can use the Magento 2 CLI to do it, you can check your current search engine using:

php -f bin/magento config:show catalog/search/engine

magerun2 to get the catalog search engine

After that you can set to the default one using the config:set feature, like that:

php -f bin/magento config:set catalog/search/engine 'mysql'

Or you can run this SQL query in your DB:

DELETE FROM `core_config_data` WHERE `path` LIKE 'catalog/search/engine'

OTHER TIPS

Magento CLI is also able to handle that:

magento config:set catalog/search/engine 'mysql'

Run this command

php bin/magento config:set catalog/search/engine '' -f

Or

Remove Value From Database

SELECT * FROM `core_config_data` WHERE `path` LIKE 'catalog/search/engine'
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top