Constants

DELIMITER

DELIMITER

Properties

$_index

$_index : string|null

Type

string|null

$_type

$_type : string|null

Type

string|null

$_requestParams

$_requestParams : array

Type

array — request parameters to the bulk api

Methods

__construct()

__construct(\Elastica\Client  $client) 

Parameters

\Elastica\Client $client

setIndex()

setIndex(string|\Elastica\Index  $index) : $this

Parameters

string|\Elastica\Index $index

Returns

$this

getIndex()

getIndex() : string|null

Returns

string|null

hasIndex()

hasIndex() : boolean

Returns

boolean

getPath()

getPath() : string

Returns

string

addAction()

addAction(\Elastica\Bulk\Action  $action) : $this

Parameters

\Elastica\Bulk\Action $action

Returns

$this

addActions()

addActions(array<mixed,\Elastica\Bulk\Action>  $actions) : $this

Parameters

array<mixed,\Elastica\Bulk\Action> $actions

Returns

$this

getActions()

getActions() : array<mixed,\Elastica\Bulk\Action>

Returns

array<mixed,\Elastica\Bulk\Action>

addDocument()

addDocument(\Elastica\Document  $document, string  $opType = null) : $this

Parameters

\Elastica\Document $document
string $opType

Returns

$this

addDocuments()

addDocuments(array<mixed,\Elastica\Document>  $documents, string  $opType = null) : $this

Parameters

array<mixed,\Elastica\Document> $documents
string $opType

Returns

$this

addScript()

addScript(\Elastica\Script\AbstractScript  $script, string  $opType = null) : $this

Parameters

\Elastica\Script\AbstractScript $script
string $opType

Returns

$this

addScripts()

addScripts(array<mixed,\Elastica\Document>  $scripts, string  $opType = null) : $this

Parameters

array<mixed,\Elastica\Document> $scripts
string $opType

Returns

$this

addData()

addData(\Elastica\Script\AbstractScript|\Elastica\Document|array  $data, string  $opType = null) : $this

Parameters

\Elastica\Script\AbstractScript|\Elastica\Document|array $data
string $opType

Returns

$this

addRawData()

addRawData(array  $data) : $this

Parameters

array $data

Throws

\Elastica\Exception\InvalidException

Returns

$this

setRequestParam()

setRequestParam(string  $name, mixed  $value) : $this

Set a url parameter on the request bulk request.

Parameters

string $name

name of the parameter

mixed $value

value of the parameter

Returns

$this

setShardTimeout()

setShardTimeout(string  $time) : $this

Set the amount of time that the request will wait the shards to come on line.

Requires Elasticsearch version >= 0.90.8.

Parameters

string $time

timeout in Elasticsearch time format

Returns

$this

__toString()

__toString() : string

Returns

string

toString()

toString() : string

Returns

string

toArray()

toArray() : array

Returns

array

_processResponse()

_processResponse(\Elastica\Response  $response) : \Elastica\Bulk\ResponseSet

Parameters

\Elastica\Response $response

Throws

\Elastica\Exception\Bulk\ResponseException
\Elastica\Exception\InvalidException

Returns

\Elastica\Bulk\ResponseSet