5

I'm using magento 2.1.3 and I'm getting the following error when I try to run the php bin/magento indexer:reindex command

Catalog Search indexer process unknown error: There is no such engine: mysql2

Does anyone know how to fix this error?

  • Same issues here. Magento version 2.3 clean install. PHP version 7.2 Checked everything with live server and dev server. 1 database tables are all the same on both dev and live. 2 All files are the same in public_html/vendor/elasticsearch No changes here. 3 admin panel information is the same as in both databases on both servers. Magento exception.log : [2019-01-28 13:58:05] main.CRITICAL: Indexer handler is not available: elasticsearch5 {"exception":"[object] (LogicException(code: 0): Indexer handler is not available: elasticsearch5 at /home/myserver/public_html/vendor/magento/module-catalog- – Koopjes Boom Jan 28 at 15:33
  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review – Jai Jan 28 at 15:57
15

Run this query

UPDATE core_config_data set value = 'mysql' where path='catalog/search/engine';

And run Following commands

php -f bin/magento setup:upgrade
php -f bin/magento cache:flush
php -f bin/magento indexer:reindex
  • Hi, we only need to flush cache after using that sql query, dont have to setup:upgrade and reindex :) thanks :) – fudu Oct 18 '18 at 9:36
3

Check your config in the node - catalog/search/engine, by default it must be MySQL, unless you are using some other engine. In your case, for some reason, it set to mysql2, but Magento can't find any information about the type.

catalog/search/engine can be found in the core_config_data database table as a path.

  • Sorry to sound ignorant, but where can I find that file exactly? – user3610374 Dec 25 '16 at 5:59
  • I checked in the store configuration and I have the search engine set to mysql and there is no option for mysql2 so I'm not sure where to go – user3610374 Dec 25 '16 at 6:07
1

Open magento root directory path and do following commands:

php -f bin/magento setup:upgrade
php -f bin/magento cache:flush
php -f bin/magento indexer:reindex
  • I have the same problem, but this solution was not working for me. – Rishabh Rk Rai Sep 1 '17 at 7:47
  • Hi @RishabhRkRai Try this command before the last one php bin/magento indexer:reset – MagEGY Sep 2 '17 at 0:02
0

Building upon the previous answers:

From developer mode, to resolve, I first reset in core_config_data table to mysql, somehow it was specfied as mysql2. Then ran the following:

Open magento root directory path and do following commands:

php -f bin/magento setup:upgrade
php -f bin/magento cache:flush
php bin/magento indexer:reset
php -f bin/magento indexer:reindex

After, I ran chown to make sure my web user/group had correct assignment in all of Magento.

  • 1
    For me, it was the Mirasvit Search module that set the engine to mysql2. After I disabled that module the error appeared. – Jacques Aug 9 '18 at 9:27
0

i am able to test elasticsearch5 via admin panel. But it does not get index. If we are changing to mysql then whats the use of elastic search .

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.