Решил я попробовать сделать поиск на FOSElasticaBundle, установка по инструкции
1.
composer require friendsofsymfony/elastica-bundle
2. в config/bundles.php прописал
FOS\ElasticaBundle\FOSElasticaBundle::class => ['all' => true],
Но при использовании эластики
private $finder;
public function __construct(PaginatedFinderInterface $finder)
{
$this->finder = $finder;
}
public function userAction()
{
$results = $this->finder->find('тест');
.....
}
получаю ошибку
Cannot autowire argument $finder of "App\Controller\SearchController::index()": it references interface "FOS\ElasticaBundle\Finder\PaginatedFinderInterface" but no such service exists. Did you create a class that implements this interface?
Что я делаю не так, подскажите пожалуйста.