phlexible / elastica-bundle
phlexible elastica bundle
Installs: 397
Dependents: 3
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.6.0
- ruflin/elastica: ^3.0
Requires (Dev)
- phpunit/phpunit: ^5.7
- psr/log: ^1.0
- symfony/config: ^2.8
- symfony/dependency-injection: ^2.8
- symfony/http-kernel: ^2.8
- symfony/yaml: ^2.8
README
The PhlexibleElasticaBundle adds support for elasticsearch indexes in phlexible.
Installation
- Download PhlexibleElasticaBundle using composer
- Enable the Bundle
- Configure the PhlexibleElasticaBundle
- Clear the symfony cache
Step 1: Download PhlexibleElasticaBundle using composer
Add PhlexibleElasticaBundle by running the command:
$ php composer.phar require phlexible/elastica-bundle "~1.0.0"
Composer will install the bundle to your project's vendor/phlexible
directory.
Step 2: Enable the bundle
Enable the bundle in the kernel:
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Phlexible\Bundle\ElasticaBundle\PhlexibleElasticaBundle(), ); }
Step 3: Configure the PhlexibleElasticaBundle
Now that the bundle is enabled, you need to configure the PhlexibleElasticaBundle. Add the following configuration to your config.yaml file.
# app/config/config.yaml phlexible_elastica: clients: default: host: your_elasticsearch_host port: 9200 logger: logger indexes: default: index_name: your_index_name
Step 4: Clear the symfony cache
If you access your phlexible application with environment prod, clear the cache:
$ php app/console cache:clear --env=prod