I'm trying to run my Integration test on magento2 but keep getting the same error.

Module 'Magento_CatalogSearch': Installing data...

[Magento\CatalogSearch\Model\Indexer\Scope\IndexTableNotExistException] Temporary table for index catalogsearch_fulltext doesn't exist, which is inconsistent with state of scope resolver

Exception trace:
 () at /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/Scope/IndexSwitcher.php:58
 Magento\CatalogSearch\Model\Indexer\Scope\IndexSwitcher->switchIndex() at /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/IndexSwitcherProxy.php:79
 Magento\CatalogSearch\Model\Indexer\IndexSwitcherProxy->switchIndex() at /var/www/html/magento2/vendor/magento/module-catalog-search/Model/Indexer/Fulltext.php:154
 Magento\CatalogSearch\Model\Indexer\Fulltext->executeFull() at /var/www/html/magento2/vendor/magento/module-indexer/Model/Indexer.php:412
 Magento\Indexer\Model\Indexer->reindexAll() at /var/www/html/magento2/vendor/magento/module-indexer/Model/Indexer/DependencyDecorator.php:248
 Magento\Indexer\Model\Indexer\DependencyDecorator->reindexAll() at /var/www/html/magento2/vendor/magento/module-catalog-search/Setup/InstallData.php:45
 Magento\CatalogSearch\Setup\InstallData->install() at /var/www/html/magento2/setup/src/Magento/Setup/Model/Installer.php:868
 Magento\Setup\Model\Installer->handleDBSchemaData() at /var/www/html/magento2/setup/src/Magento/Setup/Model/Installer.php:792
 Magento\Setup\Model\Installer->installDataFixtures() at n/a:n/a
 call_user_func_array() at /var/www/html/magento2/setup/src/Magento/Setup/Model/Installer.php:343
 Magento\Setup\Model\Installer->install() at /var/www/html/magento2/setup/src/Magento/Setup/Console/Command/InstallCommand.php:146
 Magento\Setup\Console\Command\InstallCommand->execute() at /var/www/html/magento2/vendor/symfony/console/Command/Command.php:242
 Symfony\Component\Console\Command\Command->run() at /var/www/html/magento2/vendor/symfony/console/Application.php:843
 Symfony\Component\Console\Application->doRunCommand() at /var/www/html/magento2/vendor/symfony/console/Application.php:193
 Symfony\Component\Console\Application->doRun() at /var/www/html/magento2/vendor/magento/framework/Console/Cli.php:104
 Magento\Framework\Console\Cli->doRun() at /var/www/html/magento2/vendor/symfony/console/Application.php:117
 Symfony\Component\Console\Application->run() at /var/www/html/magento2/bin/magento:23

I've tried the following:

rm -rf vendor/* composer.lock
composer update
composer upgrade
php bin/magento cache:flush           
php bin/magento setup:upgrade
php bin/magento setup:di:compile php bin/magento indexer:reindex

But nothing worked.

I installed a clean magento2 setup and here It works. But I can't figure out why al my custom code from app/code/{myvendor} from the original project was copied to the fresh install and still it works on the fresh install.

  • I have the same error when installing Magento 2.2.5 clean
    – St3phan
    Jul 10, 2018 at 10:23
  • I also have this issue, have you found any fix ?
    – lracicot
    Sep 11, 2018 at 15:41

1 Answer 1


Maybe related to the elastic search indexer in magento 2.

Elsatic search must be enabled to use it:

Magento 2.3.1 adds support for Elasticsearch 6.x and it is enabled by default. Magento still provides connectivity for Elasticsearch 2.x and 5.x but these must be enabled in order to use these versions. Elasticsearch 2.x is still supported but strongly discouraged. If you must run Elasticsearch 2.x or 5.x with Magento 2.3.1, you must change the Elasticsearch php client. Follow the instructions in Change Elasticsearch Client.


You may change to mysql indexer with the following command:

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

or change this value in the database.

Then, to list the search engine configured

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

  • Link is not answer if link is expired. So please describe it here.
    – Msquare
    Mar 19, 2020 at 3:16
  • Please review, i edited my answer.
    – Kennedy
    Mar 19, 2020 at 16:36
  • if you have any doubt. please visite magento.stackexchange.com/tour
    – Msquare
    Mar 24, 2020 at 5:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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