A very simple but drop-in zf2 module for the elasticsearch client library.
This repository contains a very simple but drop-in solution for using the elasticsearch client library in a ZF2 project.
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.
$searchClient = $serviceLocator->get('elasticsearch'); $searchClient->search();
Require the module via composer:
$ composer require enrise/zf-elasticsearch
Load the module in your application:
// config/application.config.php return array( 'modules' => array( // ... 'Enrise\\ZfModule\\ElasticSearch', ) );
And you're done!
To fine-tune your installation you can tweak the elasticsearch client configuration. For example:
// In your config file return [ 'elasticsearch' => [ 'hosts' => [ 'es1.enrise.com', 'es2.enrise.com' ], 'logging' => true ] ];
Please see the LICENSE file in this repository
This zend framework module was made by Richard Tuin.