wikibusiness/elastica-bundle
最新稳定版本:1.2
Composer 安装命令:
composer require wikibusiness/elastica-bundle
包简介
Slim wrapper bundle for Elastica, when FOSElasticaBundle is too much.
README 文档
README
This is a simple Symfony wrapper for elastica. It allows you to configure elastica as a service in Symfony.
Installation
Install is done via composer:
$ composer require wikibusiness/elastica-bundle
Add the bundle to your kernel:
// app/AppKernel.php class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new WB\ElasticaBundle\WBElasticaBundle(), ); // ... } } // ...
Configure the bundle:
# app/config/config.yml wb_elastica: servers: main: host: 127.0.0.1 port: 9200
Where main is a grouping.
If you want to use Elastica in cluster mode, the config section should look something like this:
# app/config/config.yml wb_elastica: servers: host_1: host: 127.0.0.1 port: 9200 host_2: host: 127.0.0.1 port: 9201
All done, you can now access the service via the service wb_elastica.client like this:
use Elastica\Search; $client = $container->get('wb_elastica.client'); $search = new Search($client); ...
统计信息
- 总下载量: 1.17k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-01-16