PHPackages                             blacksesion/yii2-elasticsearch - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. blacksesion/yii2-elasticsearch

ActiveYii2-extension[Search &amp; Filtering](/categories/search)

blacksesion/yii2-elasticsearch
==============================

Elasticsearch integration and ActiveRecord for the Yii framework

2.1.1(6y ago)0261BSD-3-ClausePHP

Since Dec 1Pushed 6y agoCompare

[ Source](https://github.com/blacksesion/yii2-elasticsearch)[ Packagist](https://packagist.org/packages/blacksesion/yii2-elasticsearch)[ RSS](/packages/blacksesion-yii2-elasticsearch/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (2)Versions (15)Used By (0)

 [ ![](https://camo.githubusercontent.com/f8ed5bdfef62d842f76f3f10ec3f38e4520170cc6d182ba5c8bf3860d17ddab8/68747470733a2f2f7374617469632d7777772e656c61737469632e636f2f6173736574732f626c74343562303838366339306265636565652f6c6f676f2d656c61737469632e737667) ](https://www.elastic.co/products/elasticsearch)

Elasticsearch Query and ActiveRecord for Yii 2
==============================================

[](#elasticsearch-query-and-activerecord-for-yii-2)

This extension provides the [elasticsearch](https://www.elastic.co/products/elasticsearch) integration for the [Yii framework 2.0](http://www.yiiframework.com). 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](LICENSE.md)-file.

Documentation is at [docs/guide/README.md](docs/guide/README.md).

[![Latest Stable Version](https://camo.githubusercontent.com/e8dc0bac5fb217e30397c8dd8b6440ed8900e83c6b73c7be5fbec58d3cdc3313/68747470733a2f2f706f7365722e707567782e6f72672f796969736f66742f796969322d656c61737469637365617263682f762f737461626c652e706e67)](https://packagist.org/packages/yiisoft/yii2-elasticsearch)[![Total Downloads](https://camo.githubusercontent.com/35927709f16f527ff9a07a6abcda05ad8de21e362ad970f636d7a0adc7167b8a/68747470733a2f2f706f7365722e707567782e6f72672f796969736f66742f796969322d656c61737469637365617263682f646f776e6c6f6164732e706e67)](https://packagist.org/packages/yiisoft/yii2-elasticsearch)[![Build Status](https://camo.githubusercontent.com/c145e5c28899166c54b10fe44527b24a7360aabf19da465d00ac621b15e99d75/68747470733a2f2f7472617669732d63692e6f72672f796969736f66742f796969322d656c61737469637365617263682e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/yiisoft/yii2-elasticsearch)

Requirements
------------

[](#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 at least elasticsearch version 5.0.

Note: to provide the work necessary a requests to the delete by query, in elasticsearch [since version 2.0](https://www.elastic.co/guide/en/elasticsearch/reference/1.7/docs-delete-by-query.html), you should to install the plugin [delete-by-query](https://www.elastic.co/guide/en/elasticsearch/plugins/2.3/plugins-delete-by-query.html)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

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
-------------

[](#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
            ],
        ],
    ]
];
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity71

Established project with proven stability

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~209 days

Recently: every ~409 days

Total

11

Last Release

2454d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/52cac682be5fca03b52963dee63f654dd3909d37968c3ba97967516ae0dc5ddd?d=identicon)[blacksesion](/maintainers/blacksesion)

---

Tags

searchelasticsearchyii2active-recordfulltext

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/blacksesion-yii2-elasticsearch/health.svg)

```
[![Health](https://phpackages.com/badges/blacksesion-yii2-elasticsearch/health.svg)](https://phpackages.com/packages/blacksesion-yii2-elasticsearch)
```

###  Alternatives

[yiisoft/yii2-elasticsearch

Elasticsearch integration and ActiveRecord for the Yii framework

4371.9M15](/packages/yiisoft-yii2-elasticsearch)[yiisoft/yii2-sphinx

Sphinx full text search engine extension for the Yii framework

180997.7k5](/packages/yiisoft-yii2-sphinx)[vintage/yii2-search

Search in Active Record models for Yii2

294.6k](/packages/vintage-yii2-search)[blomstra/search

Replaces Flarum search with one powered by an elastic search server.

114.9k](/packages/blomstra-search)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
