PHPackages                             himiklab/yii2-search-component-v2 - 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. himiklab/yii2-search-component-v2

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

himiklab/yii2-search-component-v2
=================================

Yii2 Zend Lucene search component v2

2.0.7(7y ago)2719.4k↓50%8MITPHP

Since Feb 2Pushed 6y ago4 watchersCompare

[ Source](https://github.com/himiklab/yii2-search-component-v2)[ Packagist](https://packagist.org/packages/himiklab/yii2-search-component-v2)[ RSS](/packages/himiklab-yii2-search-component-v2/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

Yii2 Zend Lucene Search Component V2
====================================

[](#yii2-zend-lucene-search-component-v2)

Zend Lucene search component for Yii2.

![Packagist](https://camo.githubusercontent.com/32a4d7f4057ce5ba121c5fba2b213e9b4174f6b3bbcd7ea516e7dbe170a2ca11/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68696d696b6c61622f796969322d7365617263682d636f6d706f6e656e742d76322e737667) ![Packagist](https://camo.githubusercontent.com/5bfe8da862921af49c7c00c6c4fb47b44231134215d66c707b58032e13c67e8d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68696d696b6c61622f796969322d7365617263682d636f6d706f6e656e742d76322e737667) ![license](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)

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

[](#installation)

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

- Add

```
"himiklab/yii2-search-component-v2" : "*",
"zendframework/zendsearch": "2.0.0rc6"
```

to the require section of your application's `composer.json` file.

- Add a new component in `components` section of your application's configuration file, for example:

```
'components' => [
    'search' => [
        'class' => 'himiklab\yii2\search\Search',
        'models' => [
            'app\modules\page\models\Page',
        ],
    ],
    // ...
],
```

- Add behavior in the AR models, for example:

```
use himiklab\yii2\search\behaviors\SearchBehavior;

public function behaviors()
{
    return [
        'search' => [
            'class' => SearchBehavior::className(),
            'searchScope' => function ($model) {
                /** @var \yii\db\ActiveQuery $model */
                $model->select(['title', 'body', 'url']);
                $model->andWhere(['indexed' => true]);
            },
            'searchFields' => function ($model) {
                /** @var self $model */
                return [
                    ['name' => 'title', 'value' => $model->title],
                    ['name' => 'body', 'value' => strip_tags($model->body)],
                    ['name' => 'url', 'value' => $model->url, 'type' => SearchBehavior::FIELD_KEYWORD],
                    ['name' => 'model', 'value' => 'page', 'type' => SearchBehavior::FIELD_UNSTORED],
                ];
            }
        ],
    ];
}
```

Usage
-----

[](#usage)

See example `Search` module in `samples` directory.

Resources
---------

[](#resources)

- [Zend Lucene](http://framework.zend.com/manual/1.12/en/zend.search.lucene.html)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~300 days

Total

5

Last Release

2557d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

searchyii2lucene

### Embed Badge

![Health badge](/badges/himiklab-yii2-search-component-v2/health.svg)

```
[![Health](https://phpackages.com/badges/himiklab-yii2-search-component-v2/health.svg)](https://phpackages.com/packages/himiklab-yii2-search-component-v2)
```

###  Alternatives

[vintage/yii2-search

Search in Active Record models for Yii2

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

PHPackages © 2026

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