lavamusic/elasticsearch-php-client
最新稳定版本:1.0.1-alpha
Composer 安装命令:
composer require lavamusic/elasticsearch-php-client
包简介
关键字:
README 文档
README
This is the PHP client for Elasticsearch, which is implemented with reference to the official PHP client of Elasticsearch.
The main purpose of this component is to facilitate users to operate es in the swoole related frameworks.
The cURL request driver layer is implemented using the swoole coroutine client. You can use it in swoole related frameworks (eg: EasySwoole, Hyperf, Swoft, IMIPHP, Mix-PHP, etc.).
Contents
Getting started 🐣
Using this client assumes that you have an Elasticsearch server installed and running.
You can install the client in your PHP project using composer:
composer require lavamusic/elasticsearch-php-client "dev-main"
After the installation you can connect to Elasticsearch using the ClientBuilder
class. For instance, if your Elasticsearch is running on localhost:9200
you can use the following code:
<?php use LavaMusic\Elasticsearch\ClientBuilder; $client = ClientBuilder::create() ->setHosts(['localhost:9200']) ->build(); // Info API $response = $client->info(); echo $response['version']['number']; // 7.10.1
License 📗
Apache License 2.0
统计信息
- 总下载量: 809
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2022-04-14