ElasticsearchBundle
, (*1)
Symfony2 Bundle that expose Elasticsearch official client configuration, (*2)
Installation
This bundle can be installed using composer:, (*3)
composer require openclassrooms/use-case-bundle
or by adding the package to the composer.json file directly., (*4)
{
"require": {
"openclassrooms/elasticsearch-bundle": "*"
}
}
After the package has been installed, add the bundle to the AppKernel.php file:, (*5)
// in AppKernel::registerBundles()
$bundles = array(
// ...
new OpenClassrooms\Bundle\ElasticsearchBundle\OpenClassroomsElasticsearchBundle(),
// ...
);
Configuration
Add the elasticsearch hosts to the config.yml, (*6)
``` yml
open_classrooms_elasticsearch:
clients:
client_name:
hosts :
- host
- 127.0.0.1
second_client_name:
hosts :
- second-host, (*7)
```, (*8)