Latest release: v0.1

Elasticsearch

Find out more about elasticsearch-php. And also about Elasticsearch

Content

Usage

Register elasticsearch extension in your config file.

extensions:
    elasticsearch: Contributte\Elasticsearch\DI\ElasticsearchExtension
1
2

Configuration

We're using ClientBuilder class to build and setup the Client. ClientBuilder internally uses Monolog, which you'll probably need to install as well.

composer require monolog/monolog
1

Minimal configuration

elasticsearch:
    hosts:
      - 'localhost'
1
2
3

Advanced configuration

elasticsearch:
    hosts:
        -
            host: 'localhost'
            port: 9200
            scheme: 'https'
            user: 'foo'
            pass: 'bar'
1
2
3
4
5
6
7
8

NOTE: The host is required, others are recommended, but not necessary.