PHP Shell
Permalink
Failed to load latest commit information.
.github Docs updated May 2, 2016
docs guide-ja/usage-match.md updated Aug 25, 2016
gii/model Fixes #5484: Fixed potential string suffix detection failure on 5.5.11 Oct 11, 2014
tests Fixed PHP type for `sql_attr_timestamp` attribute incorrectly detecte… Feb 20, 2017
.editorconfig Add editorconfig [skip ci] Sep 29, 2015
.gitattributes Added issue templates Apr 14, 2016
.gitignore Updated .gitignore with /tests/runtime May 26, 2015
.travis.yml Remove block comment [skip ci] Dec 7, 2015
ActiveDataProvider.php release version 2.0.6 Sep 2, 2016
ActiveFixture.php PHPDoc fix Nov 24, 2016
ActiveQuery.php Docs updated May 2, 2016
ActiveRecord.php PHPDoc fix Nov 24, 2016
CHANGELOG.md Fixed PHP type for `sql_attr_timestamp` attribute incorrectly detecte… Feb 20, 2017
ColumnSchema.php PHPDoc fix Nov 24, 2016
Command.php PHPDoc fix Nov 24, 2016
Connection.php PHPDoc fix Nov 24, 2016
IndexSchema.php PHPDoc fix Nov 24, 2016
LICENSE.md psr-4 change. Jan 11, 2014
MatchBuilder.php PHPDoc fix Nov 24, 2016
MatchExpression.php Added `filterMatch()` method to `yii\sphinx\MatchExpression` to allow… Jan 10, 2017
Query.php Added support for `yii\db\QueryInterface::emulateExecution()` to forc… Dec 13, 2016
QueryBuilder.php Fixed `yii\sphinx\Query::andFilterWhere()` quotes integer column valu… Jan 9, 2017
README.md Added link to guide Jul 28, 2015
Schema.php Fixed PHP type for `sql_attr_timestamp` attribute incorrectly detecte… Feb 20, 2017
UPGRADE.md Added `yii\sphinx\Query::groupLimit` allowing limit matches in 'group… Aug 15, 2016
composer.json update composer.json contraints Sep 5, 2016
phpunit.xml.dist Added unit tests Mar 24, 2015

README.md

Sphinx Extension for Yii 2

This extension adds Sphinx full text search engine extension for the Yii framework 2.0. It supports all Sphinx features including Runtime Indexes.

For license information check the LICENSE-file.

Documentation is at docs/guide/README.md.

Latest Stable Version Total Downloads Build Status

Requirements

At least Sphinx version 2.0 is required. However, in order to use all extension features, Sphinx version 2.2.3 or higher is required.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist yiisoft/yii2-sphinx

or add

"yiisoft/yii2-sphinx": "~2.0.0"

to the require section of your composer.json.

Configuration

This extension interacts with Sphinx search daemon using MySQL protocol and SphinxQL query language. In order to setup Sphinx "searchd" to support MySQL protocol following configuration should be added:

searchd
{
    listen = localhost:9306:mysql41
    ...
}

To use this extension, simply add the following code in your application configuration:

return [
    //....
    'components' => [
        'sphinx' => [
            'class' => 'yii\sphinx\Connection',
            'dsn' => 'mysql:host=127.0.0.1;port=9306;',
            'username' => '',
            'password' => '',
        ],
    ],
];