$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 |
||||||||||
(Other) available settings |
|
||||||||||
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
Default setting[edit]
$smwgSparqlQFeatures = SMW_SPARQL_QF_REDI | SMW_SPARQL_QF_SUBP | SMW_SPARQL_QF_SUBC;
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]
SMW_SPARQL_QF_NONE
− Sets that the SPARQL database does not support any features as required by SPARQL 1.1 (e.g. Virtuoso 6.1 or 4Store Current: May 2015)SMW_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)SMW_SPARQL_QF_SUBP
− Sets that the SPARQL database supports resolving subpropertiesSMW_SPARQL_QF_SUBC
− Sets that the SPARQL database supports resolving resolve subcategoriesSMW_SPARQL_QF_COLLATION
− Sets that the SPARQL database supports the sorting collation as maintained in configuration parameter$smwgEntityCollation
Sets 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".
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:
- Cater for repository providers that do not fully support SPARQL 1.1
$smwgSparqlQFeatures = SMW_SPARQL_QF_NONE;
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 = SMW_SPARQL_QF_SUBP | SMW_SPARQL_QF_SUBC;
or alternatively remove the option from the existing definition of the configuration parameter like e.g.
$smwgSparqlQFeatures = ( $smwgSparqlQFeatures & ~SMW_SPARQL_QF_REDI );
- Enable the sorting collation as maintained configuration parameter
$smwgEntityCollation
Sets which collation entities in Semantic MediaWiki should sort with
$smwgSparqlQFeatures = SMW_SPARQL_QF_REDI | SMW_SPARQL_QF_SUBP | SMW_SPARQL_QF_SUBC | SMW_SPARQL_QF_COLLATION;
or alternatively add the option to the existing definition of the configuration parameter like e.g.
$smwgSparqlQFeatures = $smwgSparqlQFeatures | SMW_SPARQL_QF_COLLATION;
See also[edit]
- Help page on Using SPARQL and RDF stores
- Help page on configuration parameter
$smwgDefaultStore
Sets the storage backend to be used for the semantic data - Help page on configuration parameter
$smwgEntityCollation
Sets 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
- ^ Bitwise Operators to use parentheses to ensure the desired precedence ...