Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (34 sloc) 1.04 KB

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

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

Minimal configuration

elasticsearch:
    hosts:
      - 'localhost'

Advanced configuration

elasticsearch:
    hosts:
        -
            host: 'localhost'
            port: 9200
            scheme: 'https'
            user: 'foo'
            pass: 'bar'

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

You can’t perform that action at this time.