laravel-elasticsearch

Elasticsearch for Laravel

Github星跟踪图

Laravel Elasticsearch Service Provider (4.5.0)

Latest Stable Version
Total Downloads
Build Status
Coverage Status
License

This is a Laravel (4.2) Service Provider for the official Elasticsearch low-level client.

Version Matrix

Since there are breaking changes in Elasticsearch versions, your version of Elasticsearch must match the version of this
library, which matches the version of the Elasticsearch low-level client., Shift31/laravel-elasticsearch, Elasticsearch, Laravel, :---:, :---:, :---:, 0.4, <= 0.90., 4.2, 1.0, 2.0, >= 1.0, 4.x, 5.x, 4.0, <= 0.90., 4.2, 4.1, >= 1.0 <= 2.0, 4.2, 4.2, >= 2.0 <= 5.0, 4.2, 4.5, >= 5.0, 4.2, 5.0, <= 0.90.*, 5.x, 5.1, >= 1.0 <= 2.0, 5.x, 5.2, >= 2.0 <= 5.0, 5.x, 5.5, >= 5.0, 5.x, Attention: Until we launch new versions please keep using old stable versions (which are created as a branch) and don't use dev-master branch!

Usage

  1. Run composer require shift31/laravel-elasticsearch:~4.5.0

  2. Publish config file

Laravel artisan command

$ php artisan config:publish shift31/laravel-elasticsearch 

You can always read config parameters with:

\Config::get('shift31::elasticsearch');

Note: The keys of this array should be named according the parameters supported by Elasticsearch\ClientBuilder.

  1. In the 'providers' array in app/config/app.php, add 'Shift31\LaravelElasticsearch\ElasticsearchServiceProvider'.

  2. Use the Es facade to access any method from the Elasticsearch\Client class, for example:

$searchParams['index'] = 'your_index';
$searchParams['size'] = 50;
$searchParams['body']['query']['query_string']['query'] = 'foofield:barstring';
$result = Es::search($searchParams);

Default Configuration

If you return an empty array in the config file, Service provider merges default config with custom config variables.
For custom config file question please see this elastic search configuration page.

Default config file which is publishing by artisan command.

Contributing

Please see CONTRIBUTING.md.

主要指标

概览
名称与所有者shift31/laravel-elasticsearch
主编程语言PHP
编程语言PHP (语言数: 1)
平台
许可证MIT License
所有者活动
创建于2013-10-27 06:45:06
推送于2017-08-24 20:48:39
最后一次提交2017-02-27 22:13:47
发布数27
最新版本名称v4.5.1 (发布于 )
第一版名称v1.1 (发布于 2014-05-15 10:35:25)
用户参与
星数195
关注者数11
派生数38
提交数80
已启用问题?
问题数26
打开的问题数3
拉请求数21
打开的拉请求数0
关闭的拉请求数8
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?