承接 naresh/elasticsearchclient 相关项目开发

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

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

naresh/elasticsearchclient

Composer 安装命令:

composer require naresh/elasticsearchclient

包简介

ElasticSearch client library with amazon elasticsearch PHP signing handler

README 文档

README

ElasticSearch client library with amazon elasticsearch PHP signing handler. This library is targeted for laravel but can also be used with other frameworks.

Installation

Require package in composer.json file.

    "require":{
        "naresh/elasticsearchclient": "1.0.*",
    }

And run composer update to update the dependency.

Configuration (Laravel Only)

NOTE: You do not have to add ServerProvider and Facade if you are using Laravel 5.5 package autodiscovery.

  • Add the ServiceProvider to the providers array in config/app.php

    Naresh\ElasticSearchClient\ServiceProvider::class

  • Add EsClient Facade in config/app.php

    'EsClient' => Naresh\ElasticSearchClient\Facade\EsClient::class,

Usage

You can get the new Elasticsearch instance in two ways

1) With EsClient Facade (Laravel Only)

* `EsClient::getClient($options)`

2) With new instance of Naresh\ElasticSearchClient\ElasticSearchClient

* `new ElasticSearchClient($options)`

$options

 [
    'hosts' => [],
    'aws_host' => false,
    'access_key' => '',
    'secret_key' => '',
    'region' => ''
];
  • hosts (array)

    • Elasticsearch host(s)
  • aws_host (boolean)

    • Boolean flag to specify if the hostname is AWS Elasticsearch service, however if your host has amazonaws in its URL then you dont have to add this flag, this library will assume it as AWS Elasticsearch service
  • access_key(string only needed if host is AWS Elasticsearch service)

    • AWS Elasticsearch service access key
  • secret_key(string only needed if host is AWS Elasticsearch service)

    • AWS Elasticsearch service secret key
  • region(string only needed if host is AWS Elasticsearch service)

    • AWS Elasticsearch service region

Run tests

Run unit test with phpunit following command.

    vendor/bin/phpunit -v

It will generate test coverage reports in reports folder

统计信息

  • 总下载量: 4.06k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-03-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固