PHPackages                             iwai/elasticsearch-guzzle5connection - 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. [API Development](/categories/api)
4. /
5. iwai/elasticsearch-guzzle5connection

ActiveLibrary[API Development](/categories/api)

iwai/elasticsearch-guzzle5connection
====================================

1.0.1(10y ago)2111PHP

Since May 26Pushed 10y ago1 watchersCompare

[ Source](https://github.com/iwai/elasticsearch-guzzle5connection)[ Packagist](https://packagist.org/packages/iwai/elasticsearch-guzzle5connection)[ RSS](/packages/iwai-elasticsearch-guzzle5connection/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (3)Used By (0)

elasticsearch-guzzle5connection
===============================

[](#elasticsearch-guzzle5connection)

[![Latest Stable Version](https://camo.githubusercontent.com/bc644b43dd5b850dc8fe4e23dc113ea78f38a0f73c17deeff4324472315d878c/68747470733a2f2f706f7365722e707567782e6f72672f697761692f656c61737469637365617263682d67757a7a6c6535636f6e6e656374696f6e2f762f737461626c65)](https://packagist.org/packages/iwai/elasticsearch-guzzle5connection) [![Total Downloads](https://camo.githubusercontent.com/28a2a0ee9c2cba5a35eee2d2e0db61dd5a52dfd133f95bf080044987f088e952/68747470733a2f2f706f7365722e707567782e6f72672f697761692f656c61737469637365617263682d67757a7a6c6535636f6e6e656374696f6e2f646f776e6c6f616473)](https://packagist.org/packages/iwai/elasticsearch-guzzle5connection) [![Latest Unstable Version](https://camo.githubusercontent.com/f9419db22a7eb248fd6c0a3e81ba845282f080ce1784fa66a2387f9d1ca8c19d/68747470733a2f2f706f7365722e707567782e6f72672f697761692f656c61737469637365617263682d67757a7a6c6535636f6e6e656374696f6e2f762f756e737461626c65)](https://packagist.org/packages/iwai/elasticsearch-guzzle5connection) [![License](https://camo.githubusercontent.com/fdacdd702d462015e6dac13db08a1fd759294fab59dd3ee8f6207f775e6b3aa7/68747470733a2f2f706f7365722e707567782e6f72672f697761692f656c61737469637365617263682d67757a7a6c6535636f6e6e656374696f6e2f6c6963656e7365)](https://packagist.org/packages/iwai/elasticsearch-guzzle5connection) [![Build Status](https://camo.githubusercontent.com/6258ed872d3cb6af5ac1c9b6f69549443dd5c3259f547af6490e27a7dd008fa8/68747470733a2f2f7472617669732d63692e6f72672f697761692f656c61737469637365617263682d67757a7a6c6535636f6e6e656374696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/iwai/elasticsearch-guzzle5connection)

Async support for elasticsearch-php

Caution!!!
----------

[](#caution)

- **Unsupported `ping` method**
- **Unsupported `exists` method**
- **Unsupported logging**

Install
-------

[](#install)

```
{
    "require": {
        "elasticsearch/elasticsearch": "~1.0",
        "iwai/elasticsearch-guzzle5connection": "~1.0"
    }
}
```

Example
-------

[](#example)

### Transparent async request

[](#transparent-async-request)

```
use Elasticsearch\Client as ESClient;

$client = new ESClient([
    'hosts' => [ '127.0.0.1:9200' ],
    'connectionClass' => '\Iwai\Elasticsearch\Guzzle5Connection',
    'serializerClass' => '\Iwai\Elasticsearch\FutureSerializer'
]);

$response = $client->get([
    'index' => 'index_name',
    'type'  => 'type',
    'id'    => '1',
]);

echo $response['hits']['total'];
```

### Explicit wait request

[](#explicit-wait-request)

```
use Elasticsearch\Client as ESClient;

$client = new ESClient([
    'hosts' => [ '127.0.0.1:9200' ],
    'connectionClass' => '\Iwai\Elasticsearch\Guzzle5Connection',
    'serializerClass' => '\Iwai\Elasticsearch\FutureSerializer'
]);

$future = $client->get([
    'index' => 'index_name',
    'type'  => 'type',
    'id'    => '1',
]);

$response = $future->wait();

echo $response['hits']['total'];
```

### Promise style

[](#promise-style)

```
use Elasticsearch\Client as ESClient;

$client = new ESClient([
    'hosts' => [ '127.0.0.1:9200' ],
    'connectionClass' => '\Iwai\Elasticsearch\Guzzle5Connection',
    'serializerClass' => '\Iwai\Elasticsearch\FutureSerializer'
]);

$future = $client->get([
    'index' => 'index_name',
    'type'  => 'type',
    'id'    => '1',
]);

$futureData->then(function ($response) {
    echo $response['hits']['total'];
});
```

### With RingPHP

[](#with-ringphp)

```
use React\EventLoop;
use WyriHaximus\React\RingPHP\HttpClientAdapter;
use Elasticsearch\Client as ESClient;

$loop  = EventLoop\Factory::create();

$client = new ESClient([
    'hosts' => [ '127.0.0.1:9200' ],
    'connectionClass' => '\Iwai\Elasticsearch\Guzzle5Connection', // required
    'serializerClass' => '\Iwai\Elasticsearch\FutureSerializer',  // required
    'connectionParams' => [ 'ringphp_handler' => new HttpClientAdapter($loop) ] // optional
]);

$futureData = $client->get([
    'index' => 'index_name',
    'type'  => 'type',
    'id'    => '1',
]);

$futureData->then(function ($response) {
    echo $response['hits']['total'];
});

$loop->run();
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

4005d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f6e0073ddba072af4109db5409b06283fe0f4681f747d4dcbf4aa4e0c7e97ef3?d=identicon)[iwai](/maintainers/iwai)

---

Top Contributors

[![iwai](https://avatars.githubusercontent.com/u/84846?v=4)](https://github.com/iwai "iwai (20 commits)")

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/iwai-elasticsearch-guzzle5connection/health.svg)

```
[![Health](https://phpackages.com/badges/iwai-elasticsearch-guzzle5connection/health.svg)](https://phpackages.com/packages/iwai-elasticsearch-guzzle5connection)
```

###  Alternatives

[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
