|This page contains outdated information and is thus OBSOLETE!|
Configuration en 1.0 1.2.2
Semantic MediaWiki offers a number of configuration options that site administrators may modify according to the particular needs of their wiki. This page will soon be extended to include full documentation and configuration guidelines. For now, all available options can be found in the file SMW_Settings.php. To change any configuration setting, copy the according assignment into your LocalSettings.php, after including SMW as described in installation. Do not change SMW_Settings.php directly, as your changes would be overwritten in software upgrades.
Customising Semantic MediaWiki
Semantic MediaWiki can be customised by a number of settings. To do so, you can set respective parameters somewhere below the line "include_once('extensions/SemanticMediaWiki/includes/SMW_Settings.php');" in your LocalSetting.php. For example, one can write
include_once('extensions/SemanticMediaWiki/includes/SMW_Settings.php'); $smwgQDefaultLinking = 'all'; enableSemantics('example.org');
to create links for all results returned by inline queries (this is the default anyway). The parameters that are available are documented in the file SMW_Settings.php. Do not change this file directly, but make all adoptions in your LocalSettings.php.
Semantic MediaWiki on small wikis – extended features
Some features of SMW are turned off by default, since they could slow down larger sites. If you run a small site or have a very controlled user base, then you may wish to enable these additional features. Suggested entries for LocalSettings.php are:
$smwgQEqualitySupport = SMW_EQ_FULL; // always interpret redirects as equality in queries $smwgQComparators = '<|>|!|~'; // enable the pattern search comparator ~ for strings
Further relaxation of default limits e.g. on query size are possible. See SMW_Settings.php.
Semantic MediaWiki on very large wikis – improving performance
On very large or high traffic sites, further restriction of SMW features might be desirable for performance reasons. Besides setting up the usual external caches and distributed DB-servers, you can also modify some SMW options to increase speed (while switching off features). Try some or all of the below in LocalSettings.php:
$smwgQEnabled = false; // most radical -- no more semantic queries, just browsing/display features $smwgQSubcategoryDepth = 0; // disable subcategory reasoning in queries $smwgQSubpropertyDepth = 0; // disable subproperty reasoning in queries $smwgQDisjunctionSupport = false; // completely disable disjunctions in queries $smwgQMaxSize = 5; // allow only queries of 5 or fewer conditions (default 12) $smwgQMaxDepth = 2; // allow only queries of depth 2 or smaller (default 4) $smwgQMaxLimit = 100; // never ever return more than 100 results to a query (default 10000) $smwgQDefaultLimit = 10; // only return 10 query results by default $smwgRSSWithPages = false; // do not include pages into RSS feeds, speeds up feed generation $smwgRSSEnabled = false; // switch off RSS feeds completely, so as not to atttract too many queries
These settings have different effects, and their effectiveness depends very much on the usage and content structure of your wiki. You may wich to try out conservative settings first and relax these step by step when things work reliably. If you have continued performance issues on your *large* wiki, please do not hesitate to contact the SMW developers for support.