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

SearchConfig implemenation backed by a simple \HashConfig. More...

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

Public Member Functions

 __construct (array $settings, array $flags=[], \Config $inherited=null, SearchProfileServiceFactoryFactory $searchProfileServiceFactoryFactory=null)
 
 getWikiId ()
 Allow overriding Wiki ID.
 
 getHostWikiConfig ()
 
 isLocalWiki ()
 
- Public Member Functions inherited from CirrusSearch\SearchConfig
 __construct (SearchProfileServiceFactoryFactory $searchProfileServiceFactoryFactory=null)
 Create new search config for the current wiki.
 
 getClusterAssignment ()
 
 clearCachesForTesting ()
 Reset any cached state so testing can ensures changes to global state are reflected here.
 
 has ( $name)
 
 get ( $name)
 
 makeId ( $pageId)
 
 makePageId ( $docId)
 Convert an elasticsearch document id back into a mediawiki page id.
 
 getUserLanguage ()
 Get user's language.
 
 getElement ( $configName,... $path)
 Get chain of elements from config array.
 
 isCrossProjectSearchEnabled ()
 
 isCrossLanguageSearchEnabled ()
 
 isCompletionSuggesterEnabled ()
 

Public Attributes

const FLAG_INHERIT = 'inherit'
 
- Public Attributes inherited from CirrusSearch\SearchConfig
const INDEX_BASE_NAME = 'CirrusSearchIndexBaseName'
 
const WIKI_ID_MAGIC_WORD = '__wikiid__'
 

Additional Inherited Members

- Static Public Member Functions inherited from CirrusSearch\SearchConfig
static newFromGlobals ()
 Produce new configuration from globals.
 
static getNonCirrusConfigVarNames ()
 for unit tests purpose only
 
- Protected Member Functions inherited from CirrusSearch\SearchConfig
 setSource (Config $source)
 For Unit tests.
 

Detailed Description

SearchConfig implemenation backed by a simple \HashConfig.

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\HashSearchConfig::__construct ( array $settings,
array $flags = [],
\Config $inherited = null,
SearchProfileServiceFactoryFactory $searchProfileServiceFactoryFactory = null )
Parameters
array$settingsconfig vars
string[]$flagscustomization flags:
  • inherit: config vars not part the settings provided are fetched from GlobalVarConfig
\Config | null$inherited(only useful when the inherit flag is set)
SearchProfileServiceFactoryFactory | null$searchProfileServiceFactoryFactory
Exceptions

MWException

Member Function Documentation

◆ getHostWikiConfig()

CirrusSearch\HashSearchConfig::getHostWikiConfig ( )
Returns
SearchConfig Configuration of the host wiki.

Reimplemented from CirrusSearch\SearchConfig.

◆ getWikiId()

CirrusSearch\HashSearchConfig::getWikiId ( )

Allow overriding Wiki ID.

Returns
mixed|string

Reimplemented from CirrusSearch\SearchConfig.

◆ isLocalWiki()

CirrusSearch\HashSearchConfig::isLocalWiki ( )
Returns
bool true if this config was built for this wiki.

Reimplemented from CirrusSearch\SearchConfig.


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