Configuration parameter details: | |||||
Name | $smwgDefaultStore | ||||
Description | Sets the storage backend to be used for the semantic data | ||||
Default setting | SMW\SQLStore\SQLStore |
||||
(Other) available settings |
|
||||
Software | Semantic MediaWiki | ||||
Since version | |||||
Until version | still available | ||||
Configuration | Installation · Store settings | ||||
Keyword | sqlstore · sparqlstore · store · sparql · sql · elasticsearch · elasticsearchstore |
$smwgDefaultStore
is a configuration parameter that is used to set the storage backend for the semantic data either SQL, SPARQL or Elasticsearch. This configuration parameter was introduced in Semantic MediaWiki 0.7Released on 28 April 2007 and compatible with MW 1.8.x - 1.10.x..
From Semantic MediaWiki 1.2.0Released on 10 July 2008 and compatible with MW 1.11.x - 1.14.x. to Semantic MediaWiki 1.7.1Released on 5 March 2012 and compatible with MW 1.16.0 - 1.19.x. the default store was SMWSQLStore2
(relational database) which received legacy support in Semantic MediaWiki 1.8.0Released on 2 December 2012 and compatible with MW 1.17.0 - 1.22.x
(except 1.22.1). and was dropped with Semantic MediaWiki 1.9.0Released on 3 January 2014 and compatible with MW 1.19.0 - 1.22.x..
From Semantic MediaWiki 1.8.0Released on 2 December 2012 and compatible with MW 1.17.0 - 1.22.x
(except 1.22.1). to Semantic MediaWiki 3.2.3Released on 30 March 2021 and compatible with MW 1.31.0 - 1.35.x., the default value was SMWSQLStore3
. This default value becames SMW\SQLStore\SQLStore
in Semantic MediaWiki 4.0.0Released on 18 January 2022 and compatible with MW 1.35.0 - 1.37.x. 1, but this is just a renaming of the class and SMWSQLStore3
remains a class alias.
Default setting[edit]
$smwgDefaultStore = 'SMW\SQLStore\SQLStore';
This means that a relational database is being used as a data backend/store for Semantic MediaWiki which is suitable for most standard environments.
Available options[edit]
SMW\SQLStore\SQLStore
(or aliasSMWSQLStore3
) − Sets a relational database as a data backend/store, i.e. MySQL, SQLite or PostgreSQL
- Note: This option is available since Semantic MediaWiki 1.8.0Released on 2 December 2012 and compatible with MW 1.17.0 - 1.22.x
(except 1.22.1)., originally as valueSMWSQLStore3
before renaming toSMW\SQLStore\SQLStore
in Semantic MediaWiki 3.1.0Released on 23 September 2019 and compatible with MW 1.31.0 - 1.33.x. 2.
SMW\SPARQLStore\SPARQLStore
(or aliasSMWSparqlStore
) − Sets a sparql database as the data backend/store, e.g. Blazegraph, Sesame, Fuseki etc.
- Note: This option is available since Semantic MediaWiki 1.6.0Released on 30 July 2011 and compatible with MW 1.15.x - 1.18.x., originally as value
SMWSparqlStore
before renaming toSMW\SPARQLStore\SPARQLStore
in Semantic MediaWiki 2.0Released on 4 August 2014 and compatible with MW 1.19.0 - 1.24.x. 3.
SMW\Elastic\ElasticStore
(or aliasSMWElasticStore
) − Sets an Elasticsearch database as the data backend/store
- Note: This option is available since Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x. 4.
SMW\Elastic\ElasticStore
as as setting to this configuration parameter you still need a relational database providing data storage functionality. This is not the case for the other two available options.
Changing the default setting[edit]
To modify the setting to this configuration parameter, add one of the following lines to your "LocalSettings.php" file after the enableSemantics()
call:
- Change to a sparql database for data storage
$smwgDefaultStore = 'SMW\SPARQLStore\SPARQLStore';
$smwgSparqlRepositoryConnector
Identifies a database connector that ought to be used together with the semantic data store. for Semantic MediaWiki 2.0.0Released on 4 August 2014 and compatible with MW 1.19.0 - 1.24.x. and later for more information on this setting.
- Change to a Elasticsearch database for data storage
$smwgDefaultStore = 'SMW\Elastic\ElasticStore';
See also[edit]
- Help page on database privileges, when using
SMW\SQLStore\SQLStore
- Help page on using SPARQL and RDF stores
- Help page on using the Elasticsearch store
- Help page on configuration parameter
$smwgQuerySources
Sets a list of sources, i.e. query back-ends that can return query results - Help page on configuration preloading ( Profile "db-primary-keys.php" – Defines common configuration settings in connection with adds primary keys to Semantic MediaWiki owned tables to help specialized relational datastore environments like "Percona XtraDB Cluster")5
References
- ^ | Semantic MediaWiki: GitHub pull request gh:smw:5169
- ^ Semantic MediaWiki: GitHub pull request gh:smw:4192
- ^ Semantic MediaWiki: GitHub pull request gh:smw:415
- a b Semantic MediaWiki: GitHub pull request gh:smw:3054
- ^ Semantic MediaWiki: GitHub pull request gh:smw:4732