2017 © Pedro Peláez
 

library elasticsearch-module

Zend Framework 2 Module for Elasticsearch

image

pedromdev/elasticsearch-module

Zend Framework 2 Module for Elasticsearch

  • Sunday, March 5, 2017
  • by pedromjava
  • Repository
  • 2 Watchers
  • 0 Stars
  • 71 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

ElasticsearchModule for Zend Framework 2

Build Status Scrutinizer Code Quality Coverage Status, (*1)

Integration between the Elasticsearch-PHP client and Zend Framework 2, (*2)

Installation

The installation is made through Composer. Add the dependency in your composer.json:, (*3)

{
    "require": {
        "pedromdev/elasticsearch-module": "~1.0"
    }
}

Then run command for installation:, (*4)

php composer.phar install --no-dev

Or run update command if you already have an installation:, (*5)

php composer.phar update --no-dev

After Composer install all dependencies, add ElasticsearchModule to your application.config.php:, (*6)

<?php

return [
    'modules' => [
        'ElasticsearchModule',
    ],
];

ElasticsearchModule services and configurations

Note: These services and configurations are based on the DoctrineModule/DoctrineORMModule services and configurations., (*7)

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 of elasticsearch.client.default.

Usage

<?php

$client = $serviceLocator->get('elasticsearch.client.default');
$client = $serviceLocator->get('Elasticsearch\Client');

Configuration

Create a config/autoload/elasticsearch.global.php file with the below content:, (*8)

```php <?php, (*9)

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', ], ], ], ], ], ];, (*10)

The Versions

05/03 2017

v1.x-dev

1.9999999.9999999.9999999-dev

Zend Framework 2 Module for Elasticsearch

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Pedro Alves

search elasticsearch zf2 module

05/03 2017

dev-master

9999999-dev

Zend Framework 2 Module for Elasticsearch

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Pedro Alves

search elasticsearch zf2 module

05/03 2017

v1.0.2

1.0.2.0

Zend Framework 2 Module for Elasticsearch

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Pedro Alves

search elasticsearch zf2 module

05/03 2017

dev-dev

dev-dev

Zend Framework 2 Module for Elasticsearch

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Pedro Alves

search elasticsearch zf2 module

04/03 2017

v1.0.1

1.0.1.0

Zend Framework 2 Module for Elasticsearch

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Pedro Alves

search elasticsearch zf2 module

27/02 2017

v1.0.0

1.0.0.0

Zend Framework 2 Module for Elasticsearch

  Sources   Download

MIT

The Requires

 

The Development Requires

by Pedro Alves

search elasticsearch zf2 module