I'm trying to integrate elasticsearch into my symfony application. But I couldn't find any appropriate example on the internet. Now I'm getting this service not found error:
Service "fos_elastica.finder.inscriptions.inscription" not found: even though it exists in the app's container, the container inside "App\Controller\SearchController" is a smaller service locator that only knows about the "doctrine", "form.factory", "http_kernel", "request_stack", "router", "security.authorization_checker", "security.csrf.token_manager", "security.token_storage", "serializer", "session", "templating" and "twig" services. Unless you need extra laziness, try using dependency injection instead. Otherwise, you need to declare it using "SearchController::getSubscribedServices()".
For:
$finder = $this->container->get('fos_elastica.finder.inscriptions.inscription');
As:
Symfony\Component\DependencyInjection\Exception\ ServiceNotFoundException
I don't know how to solve this problem because of insufficient experience with Symfony. Does anyone know how to solve this or any Elasticsearch example with Symfony on the internet? Thanks!
symfony
. – BentCoder