PHPackages                             zanphp/es-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. zanphp/es-sdk

ActiveLibrary[Search &amp; Filtering](/categories/search)

zanphp/es-sdk
=============

PHP No Blocking Client for Elasticsearch

16PHP

Since Jul 6Pushed 8y ago6 watchersCompare

[ Source](https://github.com/zanphp/es-sdk)[ Packagist](https://packagist.org/packages/zanphp/es-sdk)[ RSS](/packages/zanphp-es-sdk/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

elasticsearch-php
=================

[](#elasticsearch-php)

Official low-level client for Elasticsearch. Its goal is to provide common ground for all Elasticsearch-related code in PHP; because of this it tries to be opinion-free and very extendable.

To maintain consistency across all the low-level clients (Ruby, Python, etc), clients accept simple associative arrays as parameters. All parameters, from the URI to the document body, are defined in the associative array.

BranchUnit TestsCoverage[![Latest Stable Version](https://camo.githubusercontent.com/04bdc4db83589f9770d3ccc0d5dd0fa4eafdd428ad87e365195ffe36de76e7fc/68747470733a2f2f706f7365722e707567782e6f72672f656c61737469637365617263682f656c61737469637365617263682f762f737461626c652e706e67)](https://packagist.org/packages/elasticsearch/elasticsearch)[![Build Status](https://camo.githubusercontent.com/2ab1654bca9adc1e3b91a12308b5d965da2c10b7720cd59b5938b577f6c0c94b/68747470733a2f2f7472617669732d63692e6f72672f656c61737469637365617263682f656c61737469637365617263682d7068702e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/elasticsearch/elasticsearch-php)[![Coverage Status](https://camo.githubusercontent.com/fc5b5795b03e95a44633d9b1aaa466518d8c51a8a1a996761d7e7ec280d49a72/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f656c61737469637365617263682f656c61737469637365617263682d7068702f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/elasticsearch/elasticsearch-php?branch=master)Features
--------

[](#features)

- One-to-one mapping with REST API and other language clients
- Configurable, automatic discovery of cluster nodes
- Persistent, Keep-Alive connections (within the lifetime of the script)
- Load balancing (with pluggable selection strategy) across all available nodes. Defaults to round-robin
- Pluggable connection pools to offer different connection strategies
- Generalized, pluggable architecture - most components can be replaced with your own custom class if specialized behavior is required

Documentation
-------------

[](#documentation)

[Full documentation can be found here.](http://www.elasticsearch.org/guide/en/elasticsearch/client/php-api/current/index.html) Docs are stored within the repo under /docs/, so if you see a typo or problem, please submit a PR to fix it!

Installation via Composer
-------------------------

[](#installation-via-composer)

The recommended method to install *Elasticsearch-PHP* is through [Composer](http://getcomposer.org).

1. Add `elasticsearch/elasticsearch` as a dependency in your project's `composer.json` file:

```
    {
        "require": {
            "elasticsearch/elasticsearch": "~0.4"
        }
    }
```

2. Download and install Composer:

    ```
     curl -s http://getcomposer.org/installer | php

    ```
3. Install your dependencies:

    ```
     php composer.phar install

    ```
4. Require Composer's autoloader

    Composer also prepares an autoload file that's capable of autoloading all of the classes in any of the libraries that it downloads. To use it, just add the following line to your code's bootstrap process:

```
