PHPackages                             vinyvicente/yii-elastic - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. vinyvicente/yii-elastic

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

vinyvicente/yii-elastic
=======================

06PHP

Since Apr 1Pushed 12y ago1 watchersCompare

[ Source](https://github.com/vinyvicente/Yii-Elastica)[ Packagist](https://packagist.org/packages/vinyvicente/yii-elastic)[ RSS](/packages/vinyvicente-yii-elastic/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Yii-Elastica
============

[](#yii-elastica)

a Yii application component, Dataprovider and autoloader, to use Elastica PHP library inside Yii framework. the aim of this componenets is to create a dataprovider that can be used with all other Yii extesions or widgets (ex: CGridView).

### Main connfigrations

[](#main-connfigrations)

```
'preload' => array('importelastica'),

'components' => array(
 ...
 'importelastica'=>array(
   'class' => 'application.extensions.ElasticaLoader',
   'libPath' => 'application.lib', //assume you installed Elastica to /lib/
 ),
 'elastica' => array(
   'class' => 'application.components.Elastica',
   'host' => 'localhost',
   'port' => '9200',
   'debug' => true
 ),
 ...
)
```

### Usage example

[](#usage-example)

```

    $elastica_query = new Elastica\Query();
    $term_filter = new \Elastica\Filter\Term();
    $term_filter->setTerm('name', 'Elastica_test');
    $elastica_query->setFilter($term_filter);

    $dataprovider =  ElasticaDataProvider('indexname', $elastica_query, array(
      'sort' => array(
        'attributes' => array('attribute.desc',),
      ),
      'pagination' => array(
        'pageSize' => 30,
      ),
    ), 'type_name_optional');

    $data = $dataprovider->getData();

```

type name will be used ad the model name by default, if type name was not provided, the data provider will try to use the index name as a model name.

for more info about using elastica PHP library please read the documentation here: [ ruflin/Elastica](https://github.com/ruflin/Elastica)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.4% 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/f138472fcd552fb1d4820f4ce9b99a805663e0f4a8eb700e80ee40efdae392f5?d=identicon)[vinyvicente](/maintainers/vinyvicente)

---

Top Contributors

[![anasAsh](https://avatars.githubusercontent.com/u/1830449?v=4)](https://github.com/anasAsh "anasAsh (5 commits)")[![vinyvicente](https://avatars.githubusercontent.com/u/513934?v=4)](https://github.com/vinyvicente "vinyvicente (2 commits)")

### Embed Badge

![Health badge](/badges/vinyvicente-yii-elastic/health.svg)

```
[![Health](https://phpackages.com/badges/vinyvicente-yii-elastic/health.svg)](https://phpackages.com/packages/vinyvicente-yii-elastic)
```

PHPackages © 2026

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