Download the PHP package borales/yii2-elasticsearch-behavior without Composer
On this page you can find all versions of the php package borales/yii2-elasticsearch-behavior. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download borales/yii2-elasticsearch-behavior
More information about borales/yii2-elasticsearch-behavior
Files in borales/yii2-elasticsearch-behavior
Download borales/yii2-elasticsearch-behavior
More information about borales/yii2-elasticsearch-behavior
Files in borales/yii2-elasticsearch-behavior
Vendor borales
Package yii2-elasticsearch-behavior
Short Description Yii2 behavior to support Elasticsearch indexing
License BSD-3-Clause
Homepage https://github.com/Borales/yii2-elasticsearch-behavior
Package yii2-elasticsearch-behavior
Short Description Yii2 behavior to support Elasticsearch indexing
License BSD-3-Clause
Homepage https://github.com/Borales/yii2-elasticsearch-behavior
Please rate this library. Is it a good library?
Informations about the package yii2-elasticsearch-behavior
Elasticsearch Behavior for Yii 2
Yii2 AR behavior to support Elasticsearch auto-indexing.
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require
section of your composer.json
file.
Configuring
Configure model as follows (for "command" mode
):
Configuration values of the behavior:
mode
(possible values:command
ormodel
. Default iscommand
) - it is the option, which controls how to interact with Elasticsearch:- in case of
command
- the behavior use\Yii::$app->elasticsearch->createCommand()
way to execute commands. In this mode - it is required to set upelasticIndex
andelasticType
params. - in case of
model
- it is required to set upelasticClass
parameter with the value of model class name (specified class must extend the\yii\elasticsearch\ActiveRecord
model class). In this case behavior will communicate with Elasticsearch through the specified model class.
- in case of
dataMap
- this is an optional parameter. By default - the behavior will use$this->owner->attributes
dynamic property of the\yii\db\ActiveRecord
class (you can learn more how to set up this property here). Otherwise - this is a key-value array, where the keys are the field names for the Elasticsearch entry and the values are the field names of the current\yii\db\ActiveRecord
model or anonymous functions (callbacks).
Example of using "model" mode
More details and features about Elasticsearch ActiveRecord you will find here.
All versions of yii2-elasticsearch-behavior with dependencies
PHP Build Version
Package Version
Requires
yiisoft/yii2-elasticsearch Version
*
The package borales/yii2-elasticsearch-behavior contains the following files
Loading the files please wait ....