A Silex Service Provider for the official Elasticsearch Client.
{
"require": {
"xmarcos/elasticsearch-service-provider": "dev-master"
}
}
use Silex\Application;
use xmarcos\Silex\ElasticsearchServiceProvider
$app = new Application();
$app->register(new ElasticsearchServiceProvider(), [
'elasticsearch.params' => [
'hosts' => [
'127.0.0.1:9200'
],
'logging' => false
]
]);
$app['elasticsearch']->ping();
MIT License