17 $this->config = $config;
28 $configType = $this->config->getSearchType();
29 $alternatives = $this->config->getSearchTypes();
31 if (
$type && in_array(
$type, $alternatives ) ) {
33 } elseif ( $configType !==
null ) {
37 $class = self::getSearchEngineClass(
$dbr );
40 $search =
new $class(
$dbr );
52 return SearchSqlite::class;
54 return SearchMySQL::class;
56 return SearchPostgres::class;
58 return SearchMssql::class;
60 return SearchOracle::class;
62 return SearchEngineDummy::class;
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
Configuration handling class for SearchEngine.
Factory class for SearchEngine.
create( $type=null)
Create SearchEngine of the given type.
__construct(SearchEngineConfig $config)
SearchEngineConfig $config
Configuration for SearchEngine classes.
static getSearchEngineClass(IDatabase $db)