friendsofhyperf/elasticsearch

Elasticsearch client for hyperf

v3.1.43 2024-10-15 05:52 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