承接 lavamusic/elasticsearch-php-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lavamusic/elasticsearch-php-client

最新稳定版本:1.0.1-alpha

Composer 安装命令:

composer require lavamusic/elasticsearch-php-client

包简介

README 文档

README

Latest Stable Version Total Downloads

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
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2022-04-14