mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
PHRAS-1094_ES-LIB-UPGRADE
#time 1d change : upgrade the php-es lib to 2.x
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
"doctrine/dbal": "^2.4.0",
|
||||
"doctrine/migrations": "^1.0.0",
|
||||
"doctrine/orm": "^2.4.0",
|
||||
"elasticsearch/elasticsearch": "~1.0",
|
||||
"elasticsearch/elasticsearch": "~2.0",
|
||||
"facebook/php-sdk": "~3.0",
|
||||
"firebase/php-jwt": "^3.0.0",
|
||||
"gedmo/doctrine-extensions": "~2.3.0",
|
||||
|
@@ -29,7 +29,7 @@ use Alchemy\Phrasea\SearchEngine\Elastic\Search\QueryContextFactory;
|
||||
use Alchemy\Phrasea\SearchEngine\Elastic\Search\QueryCompiler;
|
||||
use Alchemy\Phrasea\SearchEngine\Elastic\Structure\GlobalStructure;
|
||||
use Alchemy\Phrasea\SearchEngine\Elastic\Thesaurus;
|
||||
use Elasticsearch\Client;
|
||||
use Elasticsearch\ClientBuilder;
|
||||
use Hoa\Compiler;
|
||||
use Hoa\File;
|
||||
use Monolog\Handler\ErrorLogHandler;
|
||||
@@ -153,7 +153,13 @@ class SearchEngineServiceProvider implements ServiceProviderInterface
|
||||
$clientParams['logging'] = true;
|
||||
}
|
||||
|
||||
return new Client($clientParams);
|
||||
$clientBuilder = ClientBuilder::create()
|
||||
->setHosts($clientParams['hosts']);
|
||||
if(array_key_exists('logObject', $clientParams)) {
|
||||
$clientBuilder->setLogger($clientParams['logObject']);
|
||||
}
|
||||
|
||||
return $clientBuilder->build();
|
||||
});
|
||||
|
||||
$app['elasticsearch.options'] = $app->share(function($app) {
|
||||
|
@@ -106,7 +106,7 @@ class Mapping
|
||||
unset($field['index_analyzer'], $field['search_analyzer']);
|
||||
break;
|
||||
case 'indexing':
|
||||
$field['index_analyzer'] = $analyzer;
|
||||
$field['analyzer'] = $analyzer;
|
||||
break;
|
||||
case 'searching':
|
||||
$field['search_analyzer'] = $analyzer;
|
||||
|
Reference in New Issue
Block a user