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 Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(),
new Liip\ImagineBundle\LiipImagineBundle(),
new FOS\ElasticaBundle\FOSElasticaBundle()
//new FOS\ElasticaBundle\FOSElasticaBundle()
];
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {

View File

@ -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"

View File

@ -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'
# - '@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\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);
}
/**