5

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?

4 Answers 4

9

⚠️ 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'
2
  • its worked but show another error: "Your current search engine, 'MySQL', is not supported. You must install a supported search engine before upgrading. See the System Upgrade Guide for more information"
    – matinict
    Aug 22, 2020 at 6:14
  • 2
    @matinict If you're using Magento 2.4, ElasticSearch is required and MySQL is not supported as a search engine anymore. Aug 23, 2020 at 22:29
1

You should try this module to disable elasticsearch engine: https://github.com/zepgram/module-disable-search-engine

0

Magento CLI is also able to handle that:

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

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'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.