7

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?

2
  • 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- Commented Jan 28, 2019 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
    – Jarnail S
    Commented Jan 28, 2019 at 15:57

5 Answers 5

23

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
1
  • Hi, we only need to flush cache after using that sql query, dont have to setup:upgrade and reindex :) thanks :)
    – fudu
    Commented Oct 18, 2018 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.

2
  • Sorry to sound ignorant, but where can I find that file exactly?
    – DarthVegan
    Commented Dec 25, 2016 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
    – DarthVegan
    Commented Dec 25, 2016 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
2
  • I have the same problem, but this solution was not working for me. Commented Sep 1, 2017 at 7:47
  • Hi @RishabhRkRai Try this command before the last one php bin/magento indexer:reset
    – MagEGY
    Commented Sep 2, 2017 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
  • 1
    For me, it was the Mirasvit Search module that set the engine to mysql2. After I disabled that module the error appeared.
    – Jacques
    Commented Aug 9, 2018 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 and acknowledge you have read our privacy policy.

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