2017 © Pedro Peláez
 

symfony-bundle elasticsearch-bundle

Symfony2 Bundle on top of elasticsearch/elasticsearch-php

image

m6web/elasticsearch-bundle

Symfony2 Bundle on top of elasticsearch/elasticsearch-php

  • Tuesday, April 10, 2018
  • by M6Web
  • Repository
  • 26 Watchers
  • 21 Stars
  • 95,818 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 13 Forks
  • 0 Open issues
  • 23 Versions
  • 5 % Grown

The README.md

ElasticsearchBundle Build Status Total Downloads License PHP Version Require

Integration of the Elasticsearch official PHP client within a Symfony Project., (*1)

Features

This bundle creates one or more Elasticsearch client services from settings defined in the application configuration., (*2)

Usage

Installation

You must first add the bundle to your composer.json:, (*3)

    "require": {
        "m6web/elasticsearch-bundle": "dev-master"
    }

Then register the bundle in your AppKernel class:, (*4)

<?php
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new M6Web\Bundle\ElasticsearchBundle\M6WebElasticsearchBundle(),
        );
        // ...
    }

Configuration

In your config.yml, you can configure one or more Elasticsearch clients:, (*5)

``` yml m6web_elasticsearch: default_client: my_client clients: my_client: hosts: - 'localhost:9200' - 'http://other_host:9201' my_other_client: hosts: - 'other_server:9200', (*6)


From this configuration, the bundle will create two services : - `m6web_elasticsearch.client.my_client` that will connect to two Elasticsearch instances: `localhost` on port 9200 and `other_host` on port 9201 - `m6web_elasticsearch.client.my_other_client` that will connect to one Elasticsearch instances: `other_server` on port 9200 It will also create `m6web_elasticsearch.client.default` which is an alias for `m6web_elasticsearch.client.my_client` ### Additional configuration Each client can have additional configuration parameters that will be used to instantiate the `\Elasticsearch\Client`. Ex: ``` yml m6web_elasticsearch: clients: my_client: hosts: - 'https://username:password@localhost:9200' headers: 'Accept-Encoding': ['gzip'] retries: 2 logger: monolog.logger.custom connectionPoolClass: '\Elasticsearch\ConnectionPool\StaticConnectionPool' selectorClass: '\Elasticsearch\ConnectionPool\Selectors\RandomSelector' connectionParams: client: timeout: 3 connect_timeout: 1

Events

The bundle dispatches \M6Web\Bundle\ElasticsearchBundle\EventDispatcher\ElasticsearchEvent events containing various information about the Elasticsearch requests., (*7)

Events are fired with the name m6web.elasticsearch., (*8)

Tests

You can launch the unit tests using:, (*9)

./vendor/bin/atoum

License

ElasticsearchBundle is licensed under the MIT license., (*10)

The Versions

16/02 2018

v1.5.x-dev

1.5.9999999.9999999-dev

Symfony2 Bundle on top of elasticsearch/elasticsearch-php

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matthieu Guillermin

30/06 2016

0.3.x-dev

0.3.9999999.9999999-dev

Symfony2 Bundle on top of elasticsearch/elasticsearch-php

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matthieu Guillermin

30/06 2016

v0.3.0

0.3.0.0

Symfony2 Bundle on top of elasticsearch/elasticsearch-php

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matthieu Guillermin

16/03 2016
13/07 2015

v0.2.2

0.2.2.0

Symfony2 Bundle on top of elasticsearch/elasticsearch-php

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matthieu Guillermin

04/02 2015

v0.2.1

0.2.1.0

Symfony2 Bundle on top of elasticsearch/elasticsearch-php

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matthieu Guillermin

30/12 2014

v0.2.0

0.2.0.0

Symfony2 Bundle on top of elasticsearch/elasticsearch-php

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matthieu Guillermin

07/11 2014

v0.1.0

0.1.0.0

Symfony2 Bundle on top of elasticsearch/elasticsearch-php

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matthieu Guillermin