Author: Aurelien FOUCRET (aurelien.foucret@smile.fr)
Exemplo n.º 1
0
 /**
  * Constructor.
  *
  * @param QueryResponseFactory   $responseFactory Search response factory.
  * @param Request\Mapper         $requestMapper   Search request mapper.
  * @param ClientFactoryInterface $clientFactory   ES Client Factory.
  * @param LoggerInterface        $logger          Logger.
  */
 public function __construct(QueryResponseFactory $responseFactory, Request\Mapper $requestMapper, ClientFactoryInterface $clientFactory, LoggerInterface $logger)
 {
     $this->responseFactory = $responseFactory;
     $this->logger = $logger;
     $this->client = $clientFactory->createClient();
     $this->requestMapper = $requestMapper;
 }
Exemplo n.º 2
0
 /**
  * Constructor.
  *
  * @param ClientFactoryInterface $clientFactory          ES Client Factory.
  * @param IndexSettingsHelper    $indexSettingsHelper    Index Settings Helper.
  * @param CacheHelper            $cacheHelper            ES caching helper.
  * @param ThesaurusConfigFactory $thesaurusConfigFactory Thesaurus configuration factory.
  */
 public function __construct(ClientFactoryInterface $clientFactory, IndexSettingsHelper $indexSettingsHelper, CacheHelper $cacheHelper, ThesaurusConfigFactory $thesaurusConfigFactory)
 {
     $this->client = $clientFactory->createClient();
     $this->indexSettingsHelper = $indexSettingsHelper;
     $this->thesaurusConfigFactory = $thesaurusConfigFactory;
     $this->cacheHelper = $cacheHelper;
 }
Exemplo n.º 3
0
 /**
  * Constructor.
  *
  * @param ClientFactoryInterface  $clientFactory       ES Client factory.
  * @param IndexOperationInterface $indexManager        ES index management tool
  * @param IndexSettingsHelper     $indexSettingsHelper Index settings helper.
  * @param CacheHelper             $cacheHelper         ES caching helper.
  */
 public function __construct(ClientFactoryInterface $clientFactory, IndexOperationInterface $indexManager, IndexSettingsHelper $indexSettingsHelper, CacheHelper $cacheHelper)
 {
     $this->client = $clientFactory->createClient();
     $this->indexSettingsHelper = $indexSettingsHelper;
     $this->indexManager = $indexManager;
     $this->cacheHelper = $cacheHelper;
 }
Exemplo n.º 4
0
 /**
  * Instanciate the index operation manager.
  *
  * @param ObjectManagerInterface $objectManager Object manager.
  * @param ClientFactoryInterface $clientFactory ES client factory.
  * @param IndexSettingsInterface $indexSettings ES settings.
  * @param LoggerInterface        $logger        Logger access.
  */
 public function __construct(ObjectManagerInterface $objectManager, ClientFactoryInterface $clientFactory, IndexSettingsInterface $indexSettings, LoggerInterface $logger)
 {
     $this->objectManager = $objectManager;
     $this->client = $clientFactory->createClient();
     $this->indexSettings = $indexSettings;
     $this->indicesConfiguration = $indexSettings->getIndicesConfig();
     $this->logger = $logger;
 }
Exemplo n.º 5
0
 /**
  * Constructor.
  *
  * @param ClientFactoryInterface $clientFactory ES Client Factory.
  * @param CacheHelper            $cacheHelper   ES cache helper.
  */
 public function __construct(ClientFactoryInterface $clientFactory, CacheHelper $cacheHelper)
 {
     $this->client = $clientFactory->createClient();
     $this->cacheHelper = $cacheHelper;
 }