schevgeny / DGSphinxSearch

Yii2 DGSphinxSearch api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Yii2 sphinx api

Yii2 sphinx api

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist schevgeny/sphinx "*"

or add

"schevgeny/sphinx": "*"

to the require section of your composer.json file.

Usage

Add component sphinx to config :

'components' => [
    ...
    'sphinx' => [
        'class' => 'schevgeny\sphinx\DGSphinxSearch',
        'server' => 'SPHINX_SERVER_IP',
        'port' => 3312,
        'maxQueryTime' => 3000,
        'enableProfiling'=>0,
        'enableResultTrace'=>0,
        'fieldWeights' => [
            'name' => 10000,
            'keywords' => 100,
        ],
    ],
]

About

Yii2 DGSphinxSearch api


Languages

Language:PHP 100.0%