Contributte Elasticsearch
# Contributte / Elasticsearch
Find out more about elasticsearch-php (opens new window) and also about Elasticsearch (opens new window)
# Content
# Setup
Install package
composer require contributte/elasticsearch
1
Register extension.
extensions:
elasticsearch: Contributte\Elasticsearch\DI\ElasticsearchExtension
1
2
2
# Configuration
elasticsearch:
hosts:
- 'localhost'
1
2
3
2
3
# Advanced configuration
elasticsearch:
hosts:
-
host: 'localhost'
port: 9200
scheme: 'https'
user: 'foo'
pass: 'bar'
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
NOTE: The host
is required, others are recommended, but not necessary.