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

InterwikiResolver suited for WMF context and uses SiteMatrix. More...

+ Inheritance diagram for CirrusSearch\SiteMatrixInterwikiResolver:
+ Collaboration diagram for CirrusSearch\SiteMatrixInterwikiResolver:

Public Member Functions

 __construct (SearchConfig $config, \MultiHttpClient $client=null, WANObjectCache $wanCache=null, BagOStuff $srvCache=null)
 
- Public Member Functions inherited from CirrusSearch\BaseInterwikiResolver
 __construct (SearchConfig $config, MultiHttpClient $client=null, WANObjectCache $wanCache=null, BagOStuff $srvCache=null, InterwikiLookup $iwLookup=null)
 
 getSisterProjectPrefixes ()
 
 getSisterProjectConfigs ()
 
 getInterwikiPrefix ( $wikiId)
 
 getSameProjectWikiByLang ( $lang)
 
 getSameProjectConfigByLang ( $lang)
 

Static Public Member Functions

static accepts (SearchConfig $config)
 

Protected Member Functions

 loadMatrix ()
 Load the interwiki matric information The returned array must include the following keys:
 
- Protected Member Functions inherited from CirrusSearch\BaseInterwikiResolver
 minimalSearchConfig ( $wiki, array $hashConfigFlags)
 Minimal config needed to run a search on a target wiki living on the same cluster as the host wiki.
 

Additional Inherited Members

- Public Attributes inherited from CirrusSearch\InterwikiResolver
const SERVICE = 'CirrusSearchInterwikiresolver'
 @const string service name
 
- Protected Attributes inherited from CirrusSearch\BaseInterwikiResolver
 $config
 

Detailed Description

InterwikiResolver suited for WMF context and uses SiteMatrix.

Member Function Documentation

◆ accepts()

static CirrusSearch\SiteMatrixInterwikiResolver::accepts ( SearchConfig $config)
static
Parameters
SearchConfig$config
Returns
bool true if this resolver can run with the specified config

◆ loadMatrix()

CirrusSearch\SiteMatrixInterwikiResolver::loadMatrix ( )
protected

Load the interwiki matric information The returned array must include the following keys:

  • sister_projects: an array with the list of sister wikis indexed by interwiki prefix
  • cross_language: an array with the list of wikis running the same project/site indexed by interwiki prefix
  • language_map: an array with the list of interwiki prefixes where where the language code of the wiki does not match the prefix
  • prefixes_by_wiki: an array with the list of interwiki indexed by wikiID

The result of this method is stored in the current InterwikiResolver instance so it can be called only once per request.

return array[]

Reimplemented from CirrusSearch\BaseInterwikiResolver.


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