$smwgSparqlQFeatures
| Configuration parameter details: | |
| Name | $smwgSparqlQFeatures |
| Description | Sets the SPARQL query features that are expected to be supported by the repository of the identifier (graph) of the SPARQL database |
| Default setting | See below |
| Software | Semantic MediaWiki |
| Since version | |
| Until version | still available |
| Configuration | Store settings |
| Keyword | sparqlstore · store · rdf · sparql · query features · query performance |
$smwgSparqlQFeatures is a configuration parameter that is used to define the SPARQL query features that are expected to be supported by the repository of the identifier (graph) of the SPARQL database. The configuration parameter was introduced in Semantic MediaWiki 2.3.0Released on 29 October 2015 and compatible with MW 1.19.0 - 1.25.x..1 Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x. introduced the SMW_SPARQL_QF_COLLATION constant as configurable setting.2
SMW_SPARQL_QF_* constants. The constant form still works but is deprecated and will be removed in Semantic MediaWiki 8.0.0Released on an unknown date and compatible with unknown versions of MediaWiki..3
Default setting[edit]
$smwgSparqlQFeatures = [ 'redirects', 'subproperties', 'subcategories' ];
The default setting means that the SPARQL database supports finding redirects using inverse property paths as well as resolving subproperties and subcategories.
Available options[edit]
'redirects'(formerlySMW_SPARQL_QF_REDI) − Sets that the SPARQL database supports finding redirects using inverse property paths (can only be used for repositories with full SPARQL 1.1 support (e.g. Fuseki or Sesame Current: May 2015)'subproperties'(formerlySMW_SPARQL_QF_SUBP) − Sets that the SPARQL database supports resolving subproperties'subcategories'(formerlySMW_SPARQL_QF_SUBC) − Sets that the SPARQL database supports resolving resolve subcategories'collation'(formerlySMW_SPARQL_QF_COLLATION) − Sets that the SPARQL database supports the sorting collation as maintained in configuration parameter$smwgEntityCollationSets which collation entities in Semantic MediaWiki should sort with. It is not enabled by default as theuca-<langcode>-*collation generates a UTF-8 string that contains unrecognized UTF codepoints that may not be understood by the back-end hence the collator prevents and armors those unrecognized characters by replacing them with a ? to avoid a cURL communication failure. Of course this means that not all elements of the sort string can be transfered to the back-end and can therefore cause a sorting distortion for close matches as in case of for example "Ennis, Ennis Hill, Ennis Jones, Ennis-Hill, Ennis-London".'no-case'(formerlySMW_SPARQL_QF_NOCASE) − Sets that the SPARQL database supports case-insensitive pattern matches.
Changing the default setting[edit]
To modify the setting to this configuration parameter, add one of the following lines to your "LocalSettings.php" file:
- Cater for repository providers that do not fully support SPARQL 1.1
$smwgSparqlQFeatures = [];
This means that a repository provider may be used that does not fully support SPARQL 1.1.
- Disable the finding of redirects using inverse property paths
$smwgSparqlQFeatures = [ 'subproperties', 'subcategories' ];
- Enable the sorting collation as maintained configuration parameter
$smwgEntityCollationSets which collation entities in Semantic MediaWiki should sort with
$smwgSparqlQFeatures = [ 'redirects', 'subproperties', 'subcategories', 'collation' ];
Legacy constant form (deprecated since 7.0.0)[edit]
SMW_SPARQL_QF_NONE corresponds to an empty array.
The default expressed with constants:
$smwgSparqlQFeatures = SMW_SPARQL_QF_REDI | SMW_SPARQL_QF_SUBP | SMW_SPARQL_QF_SUBC;
A specific feature can be removed with a bit-operation, e.g.:
$smwgSparqlQFeatures = ( $smwgSparqlQFeatures & ~SMW_SPARQL_QF_REDI );
See also[edit]
- Help page on Using SPARQL and RDF stores
- Help page on configuration parameter
$smwgDefaultStoreSets the storage backend to be used for the semantic data - Help page on configuration parameter
$smwgEntityCollationSets which collation entities in Semantic MediaWiki should sort with
References
- ^ Semantic MediaWiki: GitHub issue gh:smw:467
- ^ Semantic MediaWiki: GitHub pull request gh:smw:2429
- ^ | | | | | | | | | Semantic MediaWiki: GitHub pull request gh:smw:6793
- ^ Bitwise Operators to use parentheses to ensure the desired precedence ...