CirrusSearch
Elasticsearch-powered search for MediaWiki
|
Base InterwikiResolver class. More...
Public Member Functions | |
__construct (SearchConfig $config, MultiHttpClient $client, WANObjectCache $wanCache, InterwikiLookup $iwLookup) | |
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 | |
SearchConfig | $config |
InterwikiLookup | $interwikiLookup |
WANObjectCache | $wanCache |
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, | ||
WANObjectCache | $wanCache, | ||
InterwikiLookup | $iwLookup ) |
SearchConfig | $config | |
MultiHttpClient | $client | http client to fetch cirrus config |
WANObjectCache | $wanCache | Cache object for caching repeated requests |
InterwikiLookup | $iwLookup |
Reimplemented in CirrusSearch\SiteMatrixInterwikiResolver.
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 |