openclassrooms/elasticsearch-bundle

Symfony2 为 Elasticsearch 提供的 Bundle

安装次数: 7,787

依赖: 0

建议: 0

安全: 0

星级: 0

关注者: 29

分支: 0

开放问题: 0

类型:symfony-bundle

dev-master / 1.0.x-dev 2015-02-09 06:10 UTC

This package is auto-updated.

Last update: 2024-09-07 00:02:08 UTC


README

Build Status Coverage Status SensioLabsInsight

Symfony2 Bundle,暴露 Elasticsearch 官方客户端配置

安装

可以使用 composer 安装此 Bundle

composer require openclassrooms/use-case-bundle 或直接将包添加到 composer.json 文件中。

{
    "require": {
        "openclassrooms/elasticsearch-bundle": "*"
    }
}

安装包后,将 Bundle 添加到 AppKernel.php 文件中

// in AppKernel::registerBundles()
    $bundles = array(
        // ...
        new OpenClassrooms\Bundle\ElasticsearchBundle\OpenClassroomsElasticsearchBundle(),
        // ...
);

配置

将 Elasticsearch 主机添加到 config.yml

open_classrooms_elasticsearch:
    clients:
        client_name:
            hosts :
                - host
                - 127.0.0.1
        second_client_name:
            hosts :
                - second-host