friendsofhyperf/elasticsearch

Elasticsearch client for hyperf

v3.1.50 2024-12-13 03:21 UTC

README

Latest Stable Version Total Downloads License

The Elasticsearch client for Hyperf.

Installation

composer require friendsofhyperf/elasticsearch

Usage

use FriendsOfHyperf\Elasticsearch\ClientBuilderFactory;

class Foo
{
    public function __construct(protected ClientBuilderFactory $clientBuilderFactory)
    {
    }

    public function handle()
    {
        $client = $clientBuilderFactory->create()->build();
        // ...
    }
}

Contact

License

MIT