CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Fallbacks\FallbackRunnerContext Interface Reference

Context storing the states of the FallbackRunner. More...

+ Inheritance diagram for CirrusSearch\Fallbacks\FallbackRunnerContext:

Public Member Functions

 getInitialResultSet ()
 The initial resultset as returned by the main search query.
 
 getPreviousResultSet ()
 The resultset as rewritten by the previous fallback method.
 
 getMethodResponse ()
 Retrieve the response of the query attached to the main search request using ElasticSearchRequestFallbackMethod::getSearchRequest().
 
 costlyCallAllowed ()
 Whether or not a costly call is still allowed.
 
 makeSearcher (SearchQuery $rewrittenQuery)
 Prepare a Searcher able to search for $rewrittenQuery.
 
 getNamespacePrefixParser ()
 
 hasMethodResponse ()
 Whether or not this fallback method has an ElasticSearch response available.
 
 getCirrusSearchHookRunner ()
 

Detailed Description

Context storing the states of the FallbackRunner.

This object is populated/maintained by the FallbackRunner itself and read by the FallbackMethod.

Member Function Documentation

◆ costlyCallAllowed()

CirrusSearch\Fallbacks\FallbackRunnerContext::costlyCallAllowed ( )

Whether or not a costly call is still allowed.

Returns
bool

Implemented in CirrusSearch\Fallbacks\FallbackRunnerContextImpl.

◆ getCirrusSearchHookRunner()

CirrusSearch\Fallbacks\FallbackRunnerContext::getCirrusSearchHookRunner ( )
Returns
CirrusSearchHookRunner

Implemented in CirrusSearch\Fallbacks\FallbackRunnerContextImpl.

◆ getInitialResultSet()

CirrusSearch\Fallbacks\FallbackRunnerContext::getInitialResultSet ( )

The initial resultset as returned by the main search query.

Returns
CirrusSearchResultSet

Implemented in CirrusSearch\Fallbacks\FallbackRunnerContextImpl.

◆ getMethodResponse()

CirrusSearch\Fallbacks\FallbackRunnerContext::getMethodResponse ( )

Retrieve the response of the query attached to the main search request using ElasticSearchRequestFallbackMethod::getSearchRequest().

NOTE: This method must not be called if no requests was attached.

Returns
ElasicaResultSet
See also
ElasticSearchRequestFallbackMethod::getSearchRequest()

Implemented in CirrusSearch\Fallbacks\FallbackRunnerContextImpl.

◆ getNamespacePrefixParser()

CirrusSearch\Fallbacks\FallbackRunnerContext::getNamespacePrefixParser ( )
Returns
NamespacePrefixParser

Implemented in CirrusSearch\Fallbacks\FallbackRunnerContextImpl.

◆ getPreviousResultSet()

CirrusSearch\Fallbacks\FallbackRunnerContext::getPreviousResultSet ( )

The resultset as rewritten by the previous fallback method.

It may be equal to getInitialResultSet() if this is accessed by the first fallback method or if it was not rewritten yet. Technically this method returns the value of the previous FallbackMethod::rewrite()

Returns
CirrusSearchResultSet
See also
FallbackMethod::rewrite()

Implemented in CirrusSearch\Fallbacks\FallbackRunnerContextImpl.

◆ hasMethodResponse()

CirrusSearch\Fallbacks\FallbackRunnerContext::hasMethodResponse ( )

Whether or not this fallback method has an ElasticSearch response available.

Returns
bool

Implemented in CirrusSearch\Fallbacks\FallbackRunnerContextImpl.

◆ makeSearcher()

CirrusSearch\Fallbacks\FallbackRunnerContext::makeSearcher ( SearchQuery $rewrittenQuery)

Prepare a Searcher able to search for $rewrittenQuery.

Calling this method. NOTE: a costly call must still be allowed before creating a new Searcher.

Parameters
\CirrusSearch\Search\SearchQuery$rewrittenQuery
Returns
Searcher
See also
FallbackRunnerContext::costlyCallAllowed()

Implemented in CirrusSearch\Fallbacks\FallbackRunnerContextImpl.


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