$smwg­Fallback­Search­Type

From semantic-mediawiki.org


Configuration parameter details:
Name $smwgFallbackSearchType
Description Sets the search engine to fall back to in case SMWSearch is used as custom search engine but is unable to interpret the search term as an semantic query.
Default setting
null
Software Semantic MediaWiki
Since version
Until version still available
Configuration Search · Installation
Keyword search · query


$smwgFallbackSearchType is a configuration parameter that sets the search engine to fall back to in case the "SMWSearch" feature is used as custom search engine but is unable to interpret the search term as an semantic query. The configuration parameter was introduced in Semantic MediaWiki 2.1.0Released on 19 January 2015 and compatible with MW 1.19.0 - 1.24.x.. Starting with Semantic MediaWiki 3.1.0Released on and compatible with MW 1.31.0 - 1.33.x. compatibility with other search types than SearchMySQL, SearchPostgres or SearchOracle was improved.1

Default setting[edit]

$smwgFallbackSearchType = null;

This means that the the default search engine for the selected database type (e.g. SearchMySQL, SearchPostgres or SearchOracle) will be used as fallback search backend.

Changing the default setting[edit]

To modify the setting to this configuration parameter, add the following lines to your "LocalSettings.php" file after the enableSemantics() call:

Use CirrusSearch as default fallback search backend
$smwgFallbackSearchType = function() {
	return new \CirrusSearch();
};

This means that CirrusSearch provided by extension "CirrusSearch" (MediaWiki.org) will be used as fallback search backend.

This setting only has to be changed if the default search engine prior to using "SMWSearch" was explicitly changed to something else than null.

See also[edit]

References

  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:3940