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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?