Download the PHP package pedromdev/elasticsearch-module without Composer
On this page you can find all versions of the php package pedromdev/elasticsearch-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pedromdev/elasticsearch-module
More information about pedromdev/elasticsearch-module
Files in pedromdev/elasticsearch-module
Package elasticsearch-module
Short Description Zend Framework 2 Module for Elasticsearch
License Apache-2.0
Informations about the package elasticsearch-module
ElasticsearchModule for Zend Framework 2
Integration between the Elasticsearch-PHP client and Zend Framework 2
Installation
The installation is made through Composer. Add the dependency in your composer.json:
Then run command for installation:
Or run update command if you already have an installation:
After Composer install all dependencies, add ElasticsearchModule to your application.config.php:
ElasticsearchModule services and configurations
Note: These services and configurations are based on the DoctrineModule/DoctrineORMModule services and configurations.
Services
Registered services
elasticsearch.loggers.default
: an\ArrayObject
instance with\Psr\Log\LoggerInterface
instances. Each instance is associated to a key in loggers configuration;elasticsearch.handler.default
: default middleware callable;elasticsearch.connection_factory.default
: an\Elasticsearch\Connections\ConnectionFactoryInterface
instance;elasticsearch.connection_pool.default
: an\Elasticsearch\ConnectionPool\AbstractConnectionPool
instance;elasticsearch.transport.default
: an\Elasticsearch\Transport
instance;elasticsearch.endpoint.default
: default callable to retrieve an\Elasticsearch\Endpoints\AbstractEndpoint
instances. Its only parameter is an endpoint class name (e.g., Get, Bulk, Delete);elasticsearch.client.default
: an\Elasticsearch\Client
instance;Elasticsearch\Client
: an alias ofelasticsearch.client.default
.
Usage
Configuration
Create a config/autoload/elasticsearch.global.php file with the below content:
<?php
return [
'elasticsearch' => [
'connection_pool' => [
'default' => [
'hosts' => [
'http://localhost:9200', // string based
'http://username:password@localhost:9200', // if you have an authentication layer
[
'scheme' => 'http', // associative array based
'host' => 'localhost',
'port' => 9200,
'user' => 'username', // if you have an authentication layer
'pass' => 'password',
],
],
],
],
],
];
All versions of elasticsearch-module with dependencies
zendframework/zend-servicemanager Version ^3.1.1
zendframework/zend-modulemanager Version ^2.7