1
0
mirror of https://github.com/ToxicCrack/PrintABrick.git synced 2025-05-16 12:20:09 -07:00

removed some parts of elasticsearch

This commit is contained in:
Daniel 2020-03-20 12:02:50 +01:00
parent 843d92c534
commit a5775151bc
4 changed files with 15 additions and 13 deletions

View File

@ -21,7 +21,7 @@ class AppKernel extends Kernel
new Oneup\FlysystemBundle\OneupFlysystemBundle(), new Oneup\FlysystemBundle\OneupFlysystemBundle(),
new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(), new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(),
new Liip\ImagineBundle\LiipImagineBundle(), new Liip\ImagineBundle\LiipImagineBundle(),
new FOS\ElasticaBundle\FOSElasticaBundle() //new FOS\ElasticaBundle\FOSElasticaBundle()
]; ];
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) { if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {

View File

@ -2,7 +2,7 @@ imports:
- { resource: parameters.yml } - { resource: parameters.yml }
- { resource: security.yml } - { resource: security.yml }
- { resource: services.yml } - { resource: services.yml }
- { resource: config/fos_elastica.yml } # - { resource: config/fos_elastica.yml }
- { resource: config/liip_imagine.yml } - { resource: config/liip_imagine.yml }
# Put parameters here that don't need to change on each machine where the app is deployed # Put parameters here that don't need to change on each machine where the app is deployed
@ -77,9 +77,9 @@ monolog:
channels: ['loader'] channels: ['loader']
use_microseconds: false use_microseconds: false
handlers: handlers:
elasticsearch: #elasticsearch:
type: stream # type: stream
level: error # level: error
loader: loader:
type: rotating_file type: rotating_file
path: "%kernel.logs_dir%/loader.log" path: "%kernel.logs_dir%/loader.log"

View File

@ -48,9 +48,10 @@ services:
# ElasticSearch # ElasticSearch
FOS\ElasticaBundle\Manager\RepositoryManagerInterface: #FOS\ElasticaBundle\Manager\RepositoryManagerInterface:
alias: fos_elastica.repository_manager # alias: fos_elastica.repository_manager
AppBundle\Service\SearchService: AppBundle\Service\SearchService:
arguments: arguments:
- '@fos_elastica.manager' # - '@fos_elastica.manager'
- '@doctrine.orm.entity_manager'

View File

@ -9,7 +9,7 @@ use AppBundle\Model\SetSearch;
use AppBundle\Repository\Search\ModelRepository; use AppBundle\Repository\Search\ModelRepository;
use AppBundle\Repository\Search\SetRepository; use AppBundle\Repository\Search\SetRepository;
use FOS\ElasticaBundle\HybridResult; use FOS\ElasticaBundle\HybridResult;
use FOS\ElasticaBundle\Manager\RepositoryManagerInterface; //use FOS\ElasticaBundle\Manager\RepositoryManagerInterface;
class SearchService class SearchService
{ {
@ -22,12 +22,13 @@ class SearchService
/** /**
* SearchService constructor. * SearchService constructor.
* *
* @param RepositoryManagerInterface $repositoryManager
*/ */
public function __construct(RepositoryManagerInterface $repositoryManager) public function __construct(\Doctrine\ORM\EntityManager $em)
{ {
$this->modelRepository = $repositoryManager->getRepository(Model::class); /*$this->modelRepository = $repositoryManager->getRepository(Model::class);
$this->setRepository = $repositoryManager->getRepository(Set::class); $this->setRepository = $repositoryManager->getRepository(Set::class);*/
$this->modelRepository = $em->getRepository(Model::class);
$this->setRepository = $em->getRepository(Set::class);
} }
/** /**