Status: | effective |
Progress: | 75% |
Version: | 3.2.0+ |
Configuration
Template:Interlanguagelink: en
Configuration | |
---|---|
Lists configuration parameters that site administrators may modify according to the particular needs of their wiki. | |
Table of Contents | |
Semantic MediaWiki offers a number of configuration parameters that site administrators may modify according to the particular needs of their wiki. This page explains all configuration parameters for Semantic MediaWiki. All available configuration parameters can also be found in file File:Octocat.png DefaultSettings.php.
To change the setting of any configuration parameter, copy the respective assignment into your "LocalSettings.php" file, after including Semantic MediaWiki as described in installation. Do not change the "DefaultSettings.php" file directly, as your changes would be overwritten in software upgrades. See also the help page on function enableSemantics
including configuration preloading.
See also this page for a unordered list of configuration parameters.
Installation settings
The following settings relate to the basic installation of Semantic MediaWiki.
Cache settings
The following settings are relevant for the caching behaviour of Semantic MediaWiki, such as special pages, factboxes etc.
Interface settings
The following settings are relevant for the general appearance of various wiki pages in Semantic MediaWiki, as well as for browsing interfaces such as Special:Browse.
Parameter | Description |
---|---|
$smwgMaxNonExpNumber | The maximal number that SMW will normally display without using scientific exp notation. The default is rather large since some users have problems understanding exponents. Scientific applications may prefer a smaller value for concise display.
Default: 1000000000000000 |
Query settings
Settings for inline queries and for semantic queries in general. This can especially be used to prevent overly high server-load by complex queries. The following settings affect all queries, wherever they occur.
Parameter | Description |
---|---|
$smwgQDefaultNamespaces
|
Which namespaces should be searched by default? A value of NULL switches off default restrictions on searching, which is faster. An example value with namespaces would be [ NS_MAIN, NS_FILE ] .
Default: |
$smwgIgnoreQueryErrors
|
Should queries be executed even if some errors were detected? A hint that points out errors is shown in any case.
Default: |
Settings for inline queries
The following settings affect inline queries and querying special pages, in particular Special:Ask. Essentially they should mirror the kind of queries that should immediately be answered by the wiki, using whatever computations are needed.
Parameter | Description | Default | Version |
---|---|---|---|
[[Help:$maxRecursionDepth|$maxRecursionDepth]] | Sets the recursion depth for a template output | 2 | 1.4.0+ |
[[Help:$smwgQFilterDuplicates|$smwgQFilterDuplicates]] | Sets whether duplicate query conditions should be removed from computing query results | False | 2.5.0+ |
[[Help:$smwgQMaxDepth|$smwgQMaxDepth]] | see documentation | 1.0+ | |
[[Help:$smwgQMaxInlineLimit|$smwgQMaxInlineLimit]] | Sets the maximal number of rows ever printed by queries | 500 | 1.0+ |
[[Help:$smwgQMaxSize|$smwgQMaxSize]] | see documentation | 1.0+ | |
[[Help:$smwgQUpperbound|$smwgQUpperbound]] | Sets the upper bound of the offset used for the maximal number of rows ever printed in an embedded query | 5000 | 2.1.0+ |
Settings for Special:Ask
The following settings affect querying special pages, in particular Special:Ask. The settings for inline queries mentioned above also affect queries on special pages.
Parameter | Description | Default | Version |
---|---|---|---|
[[Help:$smwgSpecialAskFormSubmitMethod|$smwgSpecialAskFormSubmitMethod]] | see documentation | 3.0.0+ | |
[[Help:$smwgResultFormatsFeatures|$smwgResultFormatsFeatures]] | Sets whether features for some result formats should be extended | see documentation | 2.5.0+ |
Settings for concept queries
Further settings for queries. The following settings affect queries that are part of concept pages. These are usually chosen to be less restricted than inline queries, since there are two other means for controlling their use:
- Concept queries that would not be allowed as normal queries will not be executed directly, but can use pre-computed results instead. This is the default. See Concept caching for details on how to exploit this.
- The whole Concept: namespace can be restricted (using some suitable MediaWiki extension) to an experienced user group that may create more complex queries resonably. Other users can employ thus defined concepts in their queries.
Parameter | Description |
---|---|
$smwgQConceptCaching
|
Which concepts should be displayed only if available from cache? Possible values are:
In any case, caches will always be used if available (but see Default: |
$smwgQConceptMaxSize
|
Same as $smwgQMaxSize but for concepts.
Default: |
$smwgQConceptMaxDepth
|
Same as $smwgQMaxDepth but for concepts.
Default: |
$smwgQConceptFeatures
|
Same as $smwgQFeatures but for concepts. Note that using concepts in concepts is currently not supported – do not enable it!
Default: |
$smwgQConceptCacheLifetime
|
This setting defines the cache life time in minutes. If a concept cache exists but is older than this, SMW tries to recompute it, and will only use the cache if this is not allowed due to settings above.
Default: |
Settings for full-text search
The following settings affect the full-text search.
Settings for query formatting/display
Parameter | Description |
---|---|
$smwgQDefaultLinking
|
Which result columns in an inline query should be linked if not specified otherwise. Possible values are 'none' , 'subject' (links only in first column), 'all' .
Default: |
smwgResultFormats
|
This setting contains an array of all query result formats that the wiki supports. It is normally extended automatically by extensions that supply additional formats. However, it is also possible to set this array manually, e.g. to disable some formats. To disable a format, do unset($smwgResultFormats['template']); Disabled formats will be treated like if the format parameter had been omitted. The formats 'table' and 'list' are defaults that cannot be disabled. The format 'broadtable' should not be disabled either in order not to break Special:Ask.
Default: [ 'table' => 'SMWTableResultPrinter', 'list' => 'SMWListResultPrinter', 'ol' => 'SMWListResultPrinter', 'ul' => 'SMWListResultPrinter', 'broadtable' => 'SMWTableResultPrinter', 'category' => 'SMWCategoryResultPrinter', 'embedded' => 'SMWEmbeddedResultPrinter', 'template' => 'SMWListResultPrinter', 'count' => 'SMWListResultPrinter', 'debug' => 'SMWListResultPrinter', 'rss' => 'SMWRSSResultPrinter', 'csv' => 'SMWCsvResultPrinter', 'dsv' => 'SMWDSVResultPrinter', 'json' => 'SMWJSONResultPrinter', 'rdf' => 'SMWRDFResultPrinter' ]; |
Export settings
Parameter | Description | Default | Version |
---|---|---|---|
[[Help:$smwgExportResourcesAsIri|$smwgExportResourcesAsIri]] | Sets whether resources should be exported as IRIs (Internationalized Resource Identifiers) | True | 2.5.0+ |
[[Help:$smwgNamespace|$smwgNamespace]] | Sets the namespace of exported URIs | see documentation | 1.0+ |
Parameter | Description |
---|---|
$smwgAllowRecursiveExport | Can normal users request recursive export, i.e. an OWL/RDF export that includes a full export of all mentioned pages, and of all pages they mention, and so on. Recommended only for very small wikis.
Default: false |
$smwgExportBacklinks | Should incoming properties be part of OWL/RDF export?
Default: true |
Other settings
The following settings usually need no modification.
SPARQL and RDF store stettings
See also the help page on configuring Semantic MediaWiki for use with SPARQL and RDF stores.
Miscellaneous settings
Experimental settings
The following configuration parameters enable or control the behaviour of experimental features.