public function getSearchEngines() { $app = $this->loadApp(); $SE = [[new SphinxSearchEngine($app, 'localhost', 9306, 'localhost', 9308)]]; if (extension_loaded('phrasea2')) { $SE[] = [new PhraseaEngine($app)]; } if (false !== ($ret = @file_get_contents('http://localhost:9200'))) { $SE[] = [ElasticSearchEngine::create($app)]; } return $SE; }
protected function updateIndex(array $stemms = []) { $searchEngine = ElasticSearchEngine::create(self::$DI['app']); $searchEngine->getClient()->indices()->refresh(['index' => 'phraseanet']); }