PHP Класс yii\elasticsearch\BulkCommand

Further details on bulk API is available in elasticsearch guide.
С версии: 2.0.5
Автор: Konstantin Sirotkin ([email protected])
Наследование: extends yii\base\Component
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$actions Actions to be executed in this bulk command, given as either an array of arrays or as one newline-delimited string. All actions except delete span two lines.
$db Connection
$index Default index to execute the queries on. Defaults to null meaning that index needs to be specified in every action.
$options Options to be appended to the query URL.
$type Default type to execute the queries on. Defaults to null meaning that type needs to be specified in every action.

Открытые методы

Метод Описание
addAction ( $line1, $line2 = null ) Adds an action to the command. Will overwrite existing actions if they are specified as a string.
addDeleteAction ( string $id, string $index = null, string $type = null ) Adds a delete action to the command.
execute ( ) : mixed Executes the bulk command.

Описание методов

addAction() публичный Метод

Adds an action to the command. Will overwrite existing actions if they are specified as a string.
public addAction ( $line1, $line2 = null )

addDeleteAction() публичный Метод

Adds a delete action to the command.
public addDeleteAction ( string $id, string $index = null, string $type = null )
$id string Document ID
$index string Index that the document belogs to. Can be set to null if the command has a default index ([[BulkCommand::$index]]) assigned.
$type string Type that the document belogs to. Can be set to null if the command has a default type ([[BulkCommand::$type]]) assigned.

execute() публичный Метод

Executes the bulk command.
public execute ( ) : mixed
Результат mixed

Описание свойств

$actions публичное свойство

Actions to be executed in this bulk command, given as either an array of arrays or as one newline-delimited string. All actions except delete span two lines.
public $actions

$db публичное свойство

public Connection,yii\elasticsearch $db
Результат Connection

$index публичное свойство

Default index to execute the queries on. Defaults to null meaning that index needs to be specified in every action.
public $index

$options публичное свойство

Options to be appended to the query URL.
public $options

$type публичное свойство

Default type to execute the queries on. Defaults to null meaning that type needs to be specified in every action.
public $type