PHPackages                             landrain/yii2-es - 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. [Database &amp; ORM](/categories/database)
4. /
5. landrain/yii2-es

ActiveYii2-extension[Database &amp; ORM](/categories/database)

landrain/yii2-es
================

Elasticsearch integration and ActiveRecord for the Yii framework

00PHP

Since Jul 19Pushed 6y agoCompare

[ Source](https://github.com/FlyLand/yii2-elastic)[ Packagist](https://packagist.org/packages/landrain/yii2-es)[ RSS](/packages/landrain-yii2-es/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

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)

This extension works with elasticsearch version 1.0 to 4.x. elasticsearch 5.0 is currently not supported.

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

```

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

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/b208a04ce98be33a1d223fd9885d606786f768b5bb4dfa8645da676faa59b507?d=identicon)[landrain](/maintainers/landrain)

---

Top Contributors

[![FlyLand](https://avatars.githubusercontent.com/u/12993727?v=4)](https://github.com/FlyLand "FlyLand (4 commits)")

### Embed Badge

![Health badge](/badges/landrain-yii2-es/health.svg)

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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