CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Search\MSearchResponses Class Reference

Holds the Elastica result sets returned by Elastic when issuing search requests. More...

Public Member Functions

 __construct (array $resultSets, array $requests, Status $status=null)
 
 getResultSet ( $key)
 
 transformAndGetMulti (ResultsType $transformation, array $keys, callable $reordering=null)
 Transform all the resultsets identified by keys and wrap them inside a success Status stored as an array.
 
 transformAndGetSingle (ResultsType $transformation, $key)
 Transform the resultset identified by key and wrap it inside a success Status.
 
 transformAsResultSet (ResultsType $transformation, $key)
 Transform the resultset identified by key and returns it as a CirrusSearch ResultSet NOTE: The $tranformation provided must emit a CirrusResultSet.
 
 hasResponses ()
 
 hasFailure ()
 
 getFailure ()
 
 hasTimeout ()
 
 hasResultsFor ( $key)
 
 dumpResults ( $description)
 

Detailed Description

Holds the Elastica result sets returned by Elastic when issuing search requests.

Used to keep track of which search request led to which result set.

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\Search\MSearchResponses::__construct ( array $resultSets,
array $requests,
Status $status = null )
Parameters
ElasticaResultSet[]$resultSets
Search[]$requests
Status | null$statusfailure

Member Function Documentation

◆ dumpResults()

CirrusSearch\Search\MSearchResponses::dumpResults ( $description)
Parameters
string$description
Returns
Status

◆ getFailure()

CirrusSearch\Search\MSearchResponses::getFailure ( )
Returns
Status

◆ getResultSet()

CirrusSearch\Search\MSearchResponses::getResultSet ( $key)
Parameters
string$key
Returns
ElasticaResultSet

◆ hasFailure()

CirrusSearch\Search\MSearchResponses::hasFailure ( )
Returns
bool

◆ hasResponses()

CirrusSearch\Search\MSearchResponses::hasResponses ( )
Returns
bool

◆ hasResultsFor()

CirrusSearch\Search\MSearchResponses::hasResultsFor ( $key)
Parameters
string$key
Returns
bool

◆ hasTimeout()

CirrusSearch\Search\MSearchResponses::hasTimeout ( )
Returns
bool

◆ transformAndGetMulti()

CirrusSearch\Search\MSearchResponses::transformAndGetMulti ( ResultsType $transformation,
array $keys,
callable $reordering = null )

Transform all the resultsets identified by keys and wrap them inside a success Status stored as an array.

Parameters
ResultsType$transformation
string[]$keys
callable | null$reorderingreordering function
Returns
Status

◆ transformAndGetSingle()

CirrusSearch\Search\MSearchResponses::transformAndGetSingle ( ResultsType $transformation,
$key )

Transform the resultset identified by key and wrap it inside a success Status.

Parameters
ResultsType$transformation
string$key
Returns
Status

◆ transformAsResultSet()

CirrusSearch\Search\MSearchResponses::transformAsResultSet ( ResultsType $transformation,
$key )

Transform the resultset identified by key and returns it as a CirrusSearch ResultSet NOTE: The $tranformation provided must emit a CirrusResultSet.

Parameters
ResultsType$transformation
string$key
Returns
CirrusSearchResultSet

The documentation for this class was generated from the following file: