\Elastica\BulkResponse

Elastica Response object.

Stores query time, and result array -> is given to result set, returned by ...

Summary

Methods
Properties
Constants
__construct()
getError()
getFullError()
getErrorMessage()
hasError()
hasFailedShards()
isOk()
getStatus()
getData()
getTransferInfo()
setTransferInfo()
getQueryTime()
setQueryTime()
getEngineTime()
getShardsStatistics()
getScrollId()
setJsonBigintConversion()
getJsonBigintConversion()
getAction()
getOpType()
No public properties found
No constants found
No protected methods found
$_queryTime
$_responseString
$_error
$_transferInfo
$_response
$_status
$_jsonBigintConversion
$_action
$_opType
N/A
No private methods found
No private properties found
N/A

Properties

$_queryTime

$_queryTime : float

Query time.

Type

float — Query time

$_responseString

$_responseString : string

Response string (json).

Type

string — Response

$_error

$_error : boolean

Error.

Type

boolean — Error

$_transferInfo

$_transferInfo : array

Transfer info.

Type

array — transfer info

$_response

$_response : \Elastica\Response

Response.

Type

\Elastica\Response — Response object

$_status

$_status : integer

HTTP response status code.

Type

integer

$_jsonBigintConversion

$_jsonBigintConversion : boolean

Whether or not to convert bigint results to string (see issue #717).

Type

boolean

$_opType

$_opType : string

Type

string

Methods

__construct()

__construct(array|string  $responseData, \Elastica\Bulk\Action  $action, string  $opType) 

Construct.

Parameters

array|string $responseData
\Elastica\Bulk\Action $action
string $opType

getError()

getError() : string

Error message.

Returns

string —

Error message

getFullError()

getFullError() : array|string

A keyed array representing any errors that occured.

In case of http://localhost:9200/_alias/test the error is a string

Returns

array|string —

Error data

getErrorMessage()

getErrorMessage() : string

Returns

string —

Error string based on the error object

hasError()

hasError() : boolean

True if response has error.

Returns

boolean —

True if response has error

hasFailedShards()

hasFailedShards() : boolean

True if response has failed shards.

Returns

boolean —

True if response has failed shards

isOk()

isOk() : boolean

Checks if the query returned ok.

Returns

boolean —

True if ok

getStatus()

getStatus() : integer

Returns

integer

getData()

getData() : array

Response data array.

Returns

array —

Response data array

getTransferInfo()

getTransferInfo() : array

Gets the transfer information.

Returns

array —

Information about the curl request.

setTransferInfo()

setTransferInfo(array  $transferInfo) : $this

Sets the transfer info of the curl request. This function is called from the \Elastica\Client::_callService .

Parameters

array $transferInfo

The curl transfer information.

Returns

$this

getQueryTime()

getQueryTime() : float

Returns query execution time.

Returns

float —

Query time

setQueryTime()

setQueryTime(float  $queryTime) : $this

Sets the query time.

Parameters

float $queryTime

Query time

Returns

$this

getEngineTime()

getEngineTime() : integer

Time request took.

Throws

\Elastica\Exception\NotFoundException

Returns

integer —

Time request took

getShardsStatistics()

getShardsStatistics() : array

Get the _shard statistics for the response.

Throws

\Elastica\Exception\NotFoundException

Returns

array

getScrollId()

getScrollId() : string

Get the _scroll value for the response.

Throws

\Elastica\Exception\NotFoundException

Returns

string

setJsonBigintConversion()

setJsonBigintConversion(boolean  $jsonBigintConversion) 

Sets whether or not to apply bigint conversion on the JSON result.

Parameters

boolean $jsonBigintConversion

getJsonBigintConversion()

getJsonBigintConversion() : boolean

Gets whether or not to apply bigint conversion on the JSON result.

Returns

boolean

getOpType()

getOpType() : string

Returns

string