Properties

$_queryTime

$_queryTime : float

Query time.

Type

float — Query time

$_responseString

$_responseString : string

Response string (json).

Type

string — Response

$_transferInfo

$_transferInfo : array

Transfer info.

Type

array — transfer info

$_response

$_response : array|null

Response.

Type

array|null

$_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

$_position

$_position : integer

Type

integer

Methods

__construct()

__construct(\Elastica\Response  $response, array<mixed,\Elastica\Bulk\Response>  $bulkResponses) 

Construct.

Parameters

\Elastica\Response $response
array<mixed,\Elastica\Bulk\Response> $bulkResponses

getError()

getError() : string

Returns first found error.

Returns

string

getFullError()

getFullError() : array|string

Returns first found error (full array).

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

Returns

array|string

getErrorMessage()

getErrorMessage() : string

Returns

string —

Error string based on the error object

hasError()

hasError() : boolean

True if response has error.

Returns

boolean

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

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

getBulkResponses()

getBulkResponses() : array<mixed,\Elastica\Bulk\Response>

Returns

array<mixed,\Elastica\Bulk\Response>

next()

next() 

{@inheritdoc}

key()

key() 

{@inheritdoc}

valid()

valid() 

{@inheritdoc}

rewind()

rewind() 

{@inheritdoc}

count()

count() 

{@inheritdoc}