include/SugarSearchEngine/Elastic/Elastica/ResultSet.php

Show: inherited
Table of Contents

Elastica result set

List of all hits that are returned for a search on elasticsearch Result set implents iterator

Author
Nicolas Ruflin  
Category
Xodoa  
Package
Elastica  

\Elastica_ResultSet

Package: Elastica

Elastica result set

List of all hits that are returned for a search on elasticsearch Result set implents iterator

Parent(s)
?\Iterator\Countable
Author
Nicolas Ruflin  
Category
Xodoa  

Properties

Propertyprotected  $_position= '0'
Default value0Details
Type
n/a
Propertyprotected  $_response= 'null'
Default valuenullDetails
Type
n/a
Propertyprotected  $_results= 'array()'
Default valuearray()Details
Type
n/a
Propertyprotected  $_took= '0'
Default value0Details
Type
n/a

Methods

methodpublic__construct( \Elastica_Response $response ) : void

Constructs ResultSet object

Parameters
Name Type Description
$response \Elastica_Response

Response object

methodprotected_init( \Elastica_Response $response ) : void

Loads all data into the results object (initalisation)

Parameters
Name Type Description
$response \Elastica_Response

Response object

methodpubliccount( ) : int

Returns size of current set

Returns
Type Description
int Size of set
methodpubliccurrent( ) : mixed | bool

Returns the current object of the set

Returns
Type Description
mixed | bool Set object or false if not valid (no more entries)
methodpublicgetFacets( ) : array

Returns all facets results

Returns
Type Description
array Facet results
methodpublicgetResponse( ) : \Elastica_Response

Returns response object

Returns
Type Description
\Elastica_Response Response object
methodpublicgetResults( ) : array

Returns all results

Returns
Type Description
array Results
methodpublicgetTotalHits( ) : int

Returns the total number of found hits

Returns
Type Description
int Total hits
methodpublicgetTotalTime( ) : int

Returns the total number of ms for this search to complete

Returns
Type Description
int Total time
methodpublichasFacets( ) : boolean

Returns whether facets exist

Returns
Type Description
boolean Facet existence
methodpublickey( ) : int

Returns the position of the current entry

Returns
Type Description
int Current position
methodpublicnext( ) : void

Sets pointer (current) to the next item of the set

methodpublicrewind( ) : void

Resets position to 0, restarts iterator

methodpublicvalid( ) : bool

Check if an object exists at the current position

Returns
Type Description
bool True if object exists
Documentation was generated by DocBlox 0.18.1.