$_class
$_class : string
Class for the static create method to use.
Elastica result set.
List of all hits that are returned for a search on elasticsearch Result set implements iterator
$_response : \Elastica\Response
Response.
$_query : \Elastica\Query
Query.
__construct(\Elastica\Response $response, \Elastica\Query $query)
Constructs ResultSet object.
\Elastica\Response | $response | Response object |
\Elastica\Query | $query | Query object |
create(\Elastica\Response $response, \Elastica\Query $query) : \Elastica\ResultSet
Creates a new ResultSet object. Can be configured to return a different implementation of the ResultSet class.
\Elastica\Response | $response | |
\Elastica\Query | $query |
getResults() : array<mixed,\Elastica\Result>
Returns all results.
Results
getResponse() : \Elastica\Response
Returns response object.
Response object
getQuery() : \Elastica\Query
current() : \Elastica\Result|boolean
Returns the current object of the set.
Set object or false if not valid (no more entries)
offsetGet(integer $offset) : \Elastica\Result|null
Offset to retrieve.
integer | $offset |
If offset doesn't exist
offsetSet(integer $offset, \Elastica\Result $value)
Offset to set.
integer | $offset | |
\Elastica\Result | $value |
_init(\Elastica\Response $response)
Loads all data into the results object (initialisation).
\Elastica\Response | $response | Response object |