I am getting below error

Impossible to process constructor argument Parameter #0 [ Magento\Framework\Search\Adapter\Mysql\Mapper $mapper ] of Amasty\Shopby\Model\Search\Adapter\Mysql\AggregationAdapter class

Code as below

namespace Amasty\Shopby\Model\Search\Adapter\Mysql;

use Amasty\Shopby\Model\Adapter\Mysql\Aggregation\GroupDataProviderFactory;
use Magento\Framework\Search\RequestInterface;

class AggregationAdapter
     * @var \Magento\Framework\Search\Adapter\Mysql\Mapper
    private $mapper;

     * @var \Magento\Framework\Search\Adapter\Mysql\TemporaryStorageFactory
    private $temporaryStorageFactory;

     * @var \Magento\Framework\Search\Adapter\Mysql\Aggregation\Builder\Container
    private $aggregationContainer;

     * @var \Magento\Framework\Search\Adapter\Mysql\Aggregation\DataProviderContainer
    private $dataProviderContainer; 

    public function __construct(
        \Magento\Framework\Search\Adapter\Mysql\Mapper $mapper,
        \Magento\Framework\Search\Adapter\Mysql\TemporaryStorageFactory $temporaryStorageFactory,
        \Magento\Framework\Search\Adapter\Mysql\Aggregation\Builder\Container $aggregationContainer,
        \Magento\Framework\Search\Adapter\Mysql\Aggregation\DataProviderContainer $dataProviderContainer
    ) {
        $this->mapper = $mapper;
        $this->temporaryStorageFactory = $temporaryStorageFactory;
        $this->aggregationContainer = $aggregationContainer;
        $this->dataProviderContainer = $dataProviderContainer;

I know this error is due to msql is removed as default search engine, but i need way to fix above issue please help me with it

  • seems you are using third party module - see this change log - amasty.com/… use their latest version.
    – sandip
    Commented Jan 15, 2021 at 8:37
  • did you get any update @user1799722 Commented Sep 14, 2021 at 13:25
  • any fix on this? Commented Sep 15, 2021 at 0:22
  • We are getting the exact same error when running compile command. we are using Amasty layered navigation's latest version (2.17.1) still we are getting issue. Can we fix this? Commented Sep 24, 2021 at 5:11

1 Answer 1


Your Constructor Arguments like

\Magento\Framework\Search\Adapter\Mysql\Mapper $mapper

All these locations provided are wrong that's why when constructing the class it gets zero arguments.

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.