CirrusSearch
Elasticsearch-powered search for MediaWiki
|
Base InterwikiResolver class. More...
Public Member Functions | |
__construct (SearchConfig $config, MultiHttpClient $client=null, WANObjectCache $wanCache=null, BagOStuff $srvCache=null, InterwikiLookup $iwLookup=null) | |
getSisterProjectPrefixes () | |
getSisterProjectConfigs () | |
getInterwikiPrefix ( $wikiId) | |
getSameProjectWikiByLang ( $lang) | |
getSameProjectConfigByLang ( $lang) | |
Protected Member Functions | |
loadMatrix () | |
Load the interwiki matric information The returned array must include the following keys: | |
minimalSearchConfig ( $wiki, array $hashConfigFlags) | |
Minimal config needed to run a search on a target wiki living on the same cluster as the host wiki. | |
Protected Attributes | |
$config | |
Additional Inherited Members | |
Public Attributes inherited from CirrusSearch\InterwikiResolver | |
const | SERVICE = 'CirrusSearchInterwikiresolver' |
@const string service name | |
Base InterwikiResolver class.
Subclasses just need to provide the full matrix array by implementing loadMatrix(), the resulting matrix will be stored by this base class.
CirrusSearch\BaseInterwikiResolver::__construct | ( | SearchConfig | $config, |
MultiHttpClient | $client = null, | ||
WANObjectCache | $wanCache = null, | ||
BagOStuff | $srvCache = null, | ||
InterwikiLookup | $iwLookup = null ) |
SearchConfig | $config | |
\MultiHttpClient | null | $client | http client to fetch cirrus config |
WANObjectCache | null | $wanCache | Cache object for caching repeated requests |
BagOStuff | null | $srvCache | Local server cache object for caching repeated requests |
InterwikiLookup | null | $iwLookup |
Exception
CirrusSearch\BaseInterwikiResolver::getInterwikiPrefix | ( | $wikiId | ) |
CirrusSearch\BaseInterwikiResolver::getSameProjectConfigByLang | ( | $lang | ) |
string | $lang |
Implements CirrusSearch\InterwikiResolver.
CirrusSearch\BaseInterwikiResolver::getSameProjectWikiByLang | ( | $lang | ) |
string | $lang |
Implements CirrusSearch\InterwikiResolver.
CirrusSearch\BaseInterwikiResolver::getSisterProjectConfigs | ( | ) |
Implements CirrusSearch\InterwikiResolver.
CirrusSearch\BaseInterwikiResolver::getSisterProjectPrefixes | ( | ) |
Implements CirrusSearch\InterwikiResolver.
|
abstractprotected |
Load the interwiki matric information The returned array must include the following keys:
The result of this method is stored in the current InterwikiResolver instance so it can be called only once per request.
return array[]
Reimplemented in CirrusSearch\CirrusConfigInterwikiResolver, and CirrusSearch\SiteMatrixInterwikiResolver.
|
protected |
Minimal config needed to run a search on a target wiki living on the same cluster as the host wiki.
string | $wiki | |
string[] | $hashConfigFlags | constructor flags for HashSearchConfig |