diff --git a/app/AppKernel.php b/app/AppKernel.php index 48e8bdf..bd4b6cd 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -21,7 +21,7 @@ class AppKernel extends Kernel new Oneup\FlysystemBundle\OneupFlysystemBundle(), new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(), new Liip\ImagineBundle\LiipImagineBundle(), - new FOS\ElasticaBundle\FOSElasticaBundle() + //new FOS\ElasticaBundle\FOSElasticaBundle() ]; if (in_array($this->getEnvironment(), ['dev', 'test'], true)) { diff --git a/app/config/config.yml b/app/config/config.yml index 719d534..1518915 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -2,7 +2,7 @@ imports: - { resource: parameters.yml } - { resource: security.yml } - { resource: services.yml } - - { resource: config/fos_elastica.yml } +# - { resource: config/fos_elastica.yml } - { resource: config/liip_imagine.yml } # Put parameters here that don't need to change on each machine where the app is deployed @@ -77,9 +77,9 @@ monolog: channels: ['loader'] use_microseconds: false handlers: - elasticsearch: - type: stream - level: error + #elasticsearch: + # type: stream + # level: error loader: type: rotating_file path: "%kernel.logs_dir%/loader.log" diff --git a/app/config/services.yml b/app/config/services.yml index aea4f89..125f907 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -48,9 +48,10 @@ services: # ElasticSearch - FOS\ElasticaBundle\Manager\RepositoryManagerInterface: - alias: fos_elastica.repository_manager + #FOS\ElasticaBundle\Manager\RepositoryManagerInterface: + # alias: fos_elastica.repository_manager AppBundle\Service\SearchService: arguments: - - '@fos_elastica.manager' \ No newline at end of file + # - '@fos_elastica.manager' + - '@doctrine.orm.entity_manager' \ No newline at end of file diff --git a/src/AppBundle/Service/SearchService.php b/src/AppBundle/Service/SearchService.php index 294f1f9..a4550d5 100644 --- a/src/AppBundle/Service/SearchService.php +++ b/src/AppBundle/Service/SearchService.php @@ -9,7 +9,7 @@ use AppBundle\Model\SetSearch; use AppBundle\Repository\Search\ModelRepository; use AppBundle\Repository\Search\SetRepository; use FOS\ElasticaBundle\HybridResult; -use FOS\ElasticaBundle\Manager\RepositoryManagerInterface; +//use FOS\ElasticaBundle\Manager\RepositoryManagerInterface; class SearchService { @@ -22,12 +22,13 @@ class SearchService /** * SearchService constructor. * - * @param RepositoryManagerInterface $repositoryManager */ - public function __construct(RepositoryManagerInterface $repositoryManager) + public function __construct(\Doctrine\ORM\EntityManager $em) { - $this->modelRepository = $repositoryManager->getRepository(Model::class); - $this->setRepository = $repositoryManager->getRepository(Set::class); + /*$this->modelRepository = $repositoryManager->getRepository(Model::class); + $this->setRepository = $repositoryManager->getRepository(Set::class);*/ + $this->modelRepository = $em->getRepository(Model::class); + $this->setRepository = $em->getRepository(Set::class); } /**