Archived and unmaintained
This is an old repository that is no longer used or maintained. We advice to no longer use this repository., (*1)
Original README can be found below:
ZF2 Elasticsearch Module
, (*2)
This repository contains a very simple but drop-in solution for using the
elasticsearch client library in a ZF2 project., (*3)
The client is pre-configured with sensible defaults. You can further configure the client in the module config just as
you would configure the elasticsearch client
directly., (*4)
Usage example
$searchClient = $serviceLocator->get('elasticsearch');
$searchClient->search();
Installation
Require the module via composer:, (*5)
$ composer require enrise/zf-elasticsearch
Load the module in your application:, (*6)
// config/application.config.php
return array(
'modules' => array(
// ...
'Enrise\\ZfModule\\ElasticSearch',
)
);
And you're done!, (*7)
Configuration example
To fine-tune your installation you can tweak the elasticsearch client configuration. For example:, (*8)
// In your config file
return [
'elasticsearch' => [
'hosts' => [
'es1.enrise.com',
'es2.enrise.com'
],
'logging' => true
]
];
Dependencies
elasticsearch/elasticsearch:^1.0
License
Please see the LICENSE file in this repository, (*9)
Contributors
This zend framework module was made by Richard Tuin., (*10)