PHP Class Cake\ElasticSearch\ResultSet

Inheritance: extends IteratorIterato\IteratorIterator, implements Countabl\Countable, implements JsonSerializabl\JsonSerializable, use trait Cake\Collection\CollectionTrait
Datei anzeigen Open project: cakephp/elastic-search

Protected Properties

Property Type Description
$embeds array Embedded type references
$entityClass Document The full class name of the document class to wrap the results
$repoName string Name of the type that the originating query came from.
$resultSet string Holds the original instance of the result set

Public Methods

Method Description
__construct ( ResultSet $resultSet, Query $query ) Decorator's constructor
__debugInfo ( ) : array Debug output hook method.
count ( ) : integer Returns size of current set
countSuggests ( ) : integer Returns size of current suggests
current ( ) : Document Returns the current document for the iteration
getAggregation ( string $name ) : array Retrieve a specific aggregation from this result set
getAggregations ( ) : array Returns all aggregation results
getFacets ( ) : array Returns all facets results
getMaxScore ( ) : float Returns the max score of the results found
getQuery ( ) : Query Returns the original \Elastica\Query instance
getResponse ( ) : Response Returns response object
getResults ( ) : Result[] Returns all results
getSuggests ( ) : array Return all suggests
getTotalHits ( ) : integer Returns the total number of found hits
getTotalTime ( ) : integer Returns the total number of ms for this search to complete
hasFacets ( ) : boolean Returns whether facets exist
hasSuggests ( ) : boolean Returns true if the response contains suggestion results; false otherwise
hasTimedOut ( ) : boolean Returns true if the query has timed out

Method Details

__construct() public method

Decorator's constructor
public __construct ( ResultSet $resultSet, Query $query )
$resultSet Elastica\ResultSet The results from Elastica to wrap
$query Elastica\Query The Elasticsearch Query object

__debugInfo() public method

Debug output hook method.
public __debugInfo ( ) : array
return array

count() public method

Returns size of current set
public count ( ) : integer
return integer Size of set

countSuggests() public method

Returns size of current suggests
public countSuggests ( ) : integer
return integer Size of suggests

current() public method

Returns the current document for the iteration
public current ( ) : Document
return Document

getAggregation() public method

Retrieve a specific aggregation from this result set
public getAggregation ( string $name ) : array
$name string the name of the desired aggregation
return array

getAggregations() public method

Returns all aggregation results
public getAggregations ( ) : array
return array

getFacets() public method

Returns all facets results
public getFacets ( ) : array
return array Facet results

getMaxScore() public method

Returns the max score of the results found
public getMaxScore ( ) : float
return float Max Score

getQuery() public method

Returns the original \Elastica\Query instance
public getQuery ( ) : Query
return Elastica\Query

getResponse() public method

Returns response object
public getResponse ( ) : Response
return Elastica\Response Response object

getResults() public method

Returns all results
public getResults ( ) : Result[]
return Result[] Results

getSuggests() public method

Return all suggests
public getSuggests ( ) : array
return array suggest results

getTotalHits() public method

Returns the total number of found hits
public getTotalHits ( ) : integer
return integer Total hits

getTotalTime() public method

Returns the total number of ms for this search to complete
public getTotalTime ( ) : integer
return integer Total time

hasFacets() public method

Returns whether facets exist
public hasFacets ( ) : boolean
return boolean Facet existence

hasSuggests() public method

Returns true if the response contains suggestion results; false otherwise
public hasSuggests ( ) : boolean
return boolean

hasTimedOut() public method

Returns true if the query has timed out
public hasTimedOut ( ) : boolean
return boolean Timed out

Property Details

$embeds protected_oe property

Embedded type references
protected array $embeds
return array

$entityClass protected_oe property

The full class name of the document class to wrap the results
protected Document,Cake\ElasticSearch $entityClass
return Document

$repoName protected_oe property

Name of the type that the originating query came from.
protected string $repoName
return string

$resultSet protected_oe property

Holds the original instance of the result set
protected string $resultSet
return string