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
파일 보기 프로젝트 열기: yiisoft/yii2-elasticsearch

공개 프로퍼티들

프로퍼티 타입 설명
$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