_registryManager = $registry; parent::__construct( $entityFactory, $logger, $fetchStrategy, $eventManager, $storeManager, $resourceHelper, $connection, $resource ); } /** * Initialize select * * @return $this */ protected function _initSelect() { parent::_initSelect(); $queryId = $this->getQuery()->getId(); if ($queryId) { $this->addFieldToFilter('query_id', ['nin' => $queryId]); } return $this; } /** * Retrieve a value from registry by a key * * @return \Magento\Search\Model\Query */ public function getQuery() { return $this->_registryManager->registry('current_catalog_search'); } }