yii2-elasticsearch

Yii 2 Elasticsearch extension.

Github星跟踪图

This extension provides the elasticsearch integration for the Yii framework 2.0.
It includes basic querying/search support and also implements the ActiveRecord pattern that allows you to store active
records in elasticsearch.

For license information check the LICENSE-file.

Documentation is at docs/guide/README.md.

Latest Stable Version
Total Downloads
Build Status

Requirements

Dependent on the version of elasticsearch you are using you need a different version of this extension.

  • Extension version 2.0.x works with elasticsearch version 1.6.0 to 1.7.6.
  • Extension version 2.1.x requires elasticsearch 5.x.

Note: to provide the work necessary a requests to the delete by query, in elasticsearch since version 2.0, you should to install the plugin delete-by-query

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist yiisoft/yii2-elasticsearch:"~2.0.0"

or add

"yiisoft/yii2-elasticsearch": "~2.0.0"

to the require section of your composer.json.

Configuration

To use this extension, you have to configure the Connection class in your application configuration:

return [
    //....
    'components' => [
        'elasticsearch' => [
            'class' => 'yii\elasticsearch\Connection',
            'nodes' => [
                ['http_address' => '127.0.0.1:9200'],
                // configure more hosts if you have a cluster
            ],
        ],
    ]
];

主要指标

概览
名称与所有者yiisoft/yii2-elasticsearch
主编程语言PHP
编程语言PHP (语言数: 1)
平台
许可证BSD 3-Clause "New" or "Revised" License
所有者活动
创建于2013-11-26 00:31:21
推送于2025-05-11 17:34:28
最后一次提交2025-02-14 00:23:15
发布数17
最新版本名称2.1.5 (发布于 2025-02-14 00:23:03)
第一版名称2.0.0-alpha (发布于 )
用户参与
星数427
关注者数43
派生数252
提交数5.1k
已启用问题?
问题数171
打开的问题数21
拉请求数114
打开的拉请求数2
关闭的拉请求数68
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?