0

I try to turn off Elasticsearch to use Algolia Search as the default search engine. I try this command line:

bin/magento module:disable {Magento_Elasticsearch,Magento_InventoryElasticsearch,Magento_Elasticsearch6,Magento_Elasticsearch7}

But when I access category pages, it show this bug:

[2022-12-26T07:02:50.729178+00:00] main.CRITICAL: Missing required argument $adapters of Magento\Search\Model\AdapterFactory. [] []
[2022-12-26T07:02:50.820437+00:00] main.CRITICAL: BadMethodCallException: Missing required argument $adapters of Magento\Search\Model\AdapterFactory. in vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:264
Stack trace:
#0 vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(239): Magento\Framework\ObjectManager\Factory\AbstractFactory->getResolvedArgument('Magento\\Search\\...', Array, Array)
#1 vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\\Search\\...', Array, Array)
#2 vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Search\\...', Array, Array)
#3 vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Search\\...')
#4 vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(170): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Search\\...')
#5 vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(276): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Search\\...', NULL, 'adapterFactory', 'Magento\\Search\\...')
#6 vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(239): Magento\Framework\ObjectManager\Factory\AbstractFactory->getResolvedArgument('Magento\\Search\\...', Array, Array)
#7 vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\\Search\\...', Array, Array)
#8 vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Search\\...', Array, Array)
#9 vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Search\\...')
#10 vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(170): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Search\\...')
#11 vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(276): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Framewo...', NULL, 'searchEngine', 'Magento\\Search\\...')
#12 vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(239): Magento\Framework\ObjectManager\Factory\AbstractFactory->getResolvedArgument('Magento\\Search\\...', Array, Array)
#13 vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\\Search\\...', Array, Array)
#14 vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Search\\...', Array, Array)

Anybody has any idea, please let me know. Thank you so much!

2 Answers 2

1

Algolia is intend to replace Magento default Search, not affect catalog product listing in both backend and frontend which use Elastichsearch.

So you should keep Elastichsearch modules for catalog product listing.


Updated based on additional information from the original poster
In case you don't want to use or are not ready to use Elasticsearch engine, you can use this module to disable Elasticsearch: https://github.com/zepgram/module-disable-search-engine

3
  • Thank you! I don't use Elasticsearch and I don't have Elasticsearch engine on my server. Dec 26, 2022 at 10:36
  • I've updated my answer based on your new information.
    – Tu Van
    Dec 26, 2022 at 10:50
  • Thank you so much! Dec 26, 2022 at 11:42
1

Please restart the elastic search service and run the magento commands

sudo service elasticsearch restart if this running correctly,
then check your module php bin/magento module:enable Magento_Elasticsearch6 Magento_Elasticsearch Magento_Elasticsearch7

Still not worked, try below,

put params of working ElasticSearch service in Stores > Settings > Configuration > Catalog > Catalog > Catalog Search
PLease have look into this as well,

https://webkul.com/blog/how-to-replace-magento2-default-search-engine/

1
  • Thank you! Thank you! I don't use Elasticsearch and I don't have Elasticsearch engine on my server. Dec 26, 2022 at 10:35

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.