CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Fallbacks\FallbackStatus Class Reference

Representation of the result of running a FallbackMethod. More...

Public Member Functions

 apply (CirrusSearchResultSet $currentSet)
 
 getAction ()
 

Static Public Member Functions

static suggestQuery (string $query, $snippet=null)
 
static replaceLocalResults (CirrusSearchResultSet $rewrittenResults, string $query, $snippet=null)
 
static addInterwikiResults (CirrusSearchResultSet $results, string $wikiId)
 
static noSuggestion ()
 

Public Attributes

const NO_ACTION = 'noSuggestion'
 
const ACTION_SUGGEST_QUERY = 'suggestQuery'
 
const ACTION_REPLACE_LOCAL_RESULTS = 'replaceLocalResults'
 
const ACTION_ADD_INTERWIKI_RESULTS = 'addInterwikiResults'
 

Detailed Description

Representation of the result of running a FallbackMethod.

Describes the change that the method has decided to apply to the search result set. This primarily allows wrapping the changes into atomic units of execution so the execution trace can be logged.

Member Function Documentation

◆ addInterwikiResults()

static CirrusSearch\Fallbacks\FallbackStatus::addInterwikiResults ( CirrusSearchResultSet $results,
string $wikiId )
static
Parameters
CirrusSearchResultSet$resultsInterwiki results to add to current result set
string$wikiIdThe wiki these results come from
Returns
FallbackStatus

◆ getAction()

CirrusSearch\Fallbacks\FallbackStatus::getAction ( )
Returns
string The fallback action to perform

◆ replaceLocalResults()

static CirrusSearch\Fallbacks\FallbackStatus::replaceLocalResults ( CirrusSearchResultSet $rewrittenResults,
string $query,
$snippet = null )
static
Parameters
CirrusSearchResultSet$rewrittenResultsNew result set to replace existing results with
string$queryThe search query performed in the new result set.
HtmlArmor | string | null$snippetA highlighted snippet showing the changes in $query.
Returns
FallbackStatus

◆ suggestQuery()

static CirrusSearch\Fallbacks\FallbackStatus::suggestQuery ( string $query,
$snippet = null )
static
Parameters
string$query
HtmlArmor | string | null$snippet
Returns
FallbackStatus

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