CirrusSearch
Elasticsearch-powered search for MediaWiki
|
Configuration class encapsulating Searcher environment. More...
Public Member Functions | |
__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. | |
isLocalWiki () | |
getHostWikiConfig () | |
has ( $name) | |
get ( $name) | |
getWikiId () | |
Return configured Wiki ID. | |
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 () | |
Static Public Member Functions | |
static | newFromGlobals () |
Produce new configuration from globals. | |
static | getNonCirrusConfigVarNames () |
for unit tests purpose only | |
Public Attributes | |
const | INDEX_BASE_NAME = 'CirrusSearchIndexBaseName' |
const | WIKI_ID_MAGIC_WORD = '__wikiid__' |
Protected Member Functions | |
setSource (Config $source) | |
For Unit tests. | |
Configuration class encapsulating Searcher environment.
This config class can import settings from the environment globals, or from specific wiki configuration.
CirrusSearch\SearchConfig::__construct | ( | SearchProfileServiceFactoryFactory | $searchProfileServiceFactoryFactory = null | ) |
Create new search config for the current wiki.
SearchProfileServiceFactoryFactory | null | $searchProfileServiceFactoryFactory |
CirrusSearch\SearchConfig::clearCachesForTesting | ( | ) |
Reset any cached state so testing can ensures changes to global state are reflected here.
Only public for use from phpunit.
CirrusSearch\SearchConfig::get | ( | $name | ) |
string | $name |
CirrusSearch\SearchConfig::getElement | ( | $configName, | |
$path ) |
Get chain of elements from config array.
string | $configName | |
string | ...$path list of path elements |
CirrusSearch\SearchConfig::getHostWikiConfig | ( | ) |
Reimplemented in CirrusSearch\HashSearchConfig.
|
static |
for unit tests purpose only
CirrusSearch\SearchConfig::getUserLanguage | ( | ) |
Get user's language.
CirrusSearch\SearchConfig::getWikiId | ( | ) |
CirrusSearch\SearchConfig::has | ( | $name | ) |
string | $name |
CirrusSearch\SearchConfig::isCompletionSuggesterEnabled | ( | ) |
CirrusSearch\SearchConfig::isCrossLanguageSearchEnabled | ( | ) |
CirrusSearch\SearchConfig::isCrossProjectSearchEnabled | ( | ) |
CirrusSearch\SearchConfig::isLocalWiki | ( | ) |
Reimplemented in CirrusSearch\HashSearchConfig.
CirrusSearch\SearchConfig::makeId | ( | $pageId | ) |
string | int | $pageId |
CirrusSearch\SearchConfig::makePageId | ( | $docId | ) |
Convert an elasticsearch document id back into a mediawiki page id.
string | $docId | Elasticsearch document id |
Exception
|
static |
Produce new configuration from globals.
|
protected |
For Unit tests.
Config | $source | Config override source |