$smwgExperimentalFeatures

From semantic-mediawiki.org


Configuration parameter details:
Name $smwgExperimentalFeatures
Description Sets experimental features
Default setting See below
Software Semantic MediaWiki
Since version
Until version still available
Configuration Query performance · Store settings · Miscellaneous
Keyword query features · query performance · store setup · store · mysql · postgresql


$smwgExperimentalFeatures is a configuration parameter to set experimental features 1 that are considered stable. However they can be disabled in case any unforeseen behaviour is being observed. The configuration parameter was introduced in Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x.. The default setting for this configuration parameter was changed with the introduction of a new option in Semantic MediaWiki 3.1.0Released on 23 September 2019 and compatible with MW 1.31.0 - 1.33.x..23

Starting with Semantic MediaWiki 7.0.0Released on 4 June 2026 and compatible with MW 1.43.x - 1.46.x. this parameter accepts an array of plain string keys instead of the SMW_* 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..4

Default setting[edit]

$smwgExperimentalFeatures = [ 'queryresult-prefetch', 'showparser-curtailment' ];

This means that the prefetch query feature52 for resolving query requests is being used. Moreover the parser function #show will directly access the database to request an output for one particular entity.

Available options[edit]

The options enabled by default are highlighted bold.
  • 'queryresult-prefetch' (formerly SMW_QUERYRESULT_PREFETCH) – Sets that the prefetch query feature5 for resolving query requests is being used. This option is specific to relational data stores, i.e. MySQL and PostgreSQL.2
  • 'showparser-curtailment' (formerly SMW_SHOWPARSER_USE_CURTAILMENT) – Sets the parser function #show to use a short cut and circumventing the QueryEngine by directly accessing the database since it will always only request an output for one particular entity.3

Changing the default setting[edit]

To modify the setting to this configuration parameter, add one of the following lines to your "LocalSettings.php" file:

Disabling all experimental query features

To disable all experimental features set an empty array instead of the strings as shown in the above section on available options:

$smwgExperimentalFeatures = [];
This setting allows to retain the behavior prior to the introduction of the new experimental feature in case issues arise.

Legacy constant form (deprecated since 7.0.0)[edit]

The constant form below is deprecated since Semantic MediaWiki 7.0.0Released on 4 June 2026 and compatible with MW 1.43.x - 1.46.x. and will be removed in Semantic MediaWiki 8.0.0Released on an unknown date and compatible with unknown versions of MediaWiki.. Use the string-array form shown above instead. It is documented here for wikis still running the constant form.

The default expressed with constants:

$smwgExperimentalFeatures = SMW_QUERYRESULT_PREFETCH | SMW_SHOWPARSER_USE_CURTAILMENT;

To disable all experimental features with the constant form, set 0:

$smwgExperimentalFeatures = 0;

Note: "gh:smw:2461" was removed with "gh:smw:3277" prior to the release of SMW 3.0.0.




References

  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:2936
  2. a b c  Semantic MediaWiki: GitHub pull request gh:smw:4063
  3. a b  Semantic MediaWiki: GitHub pull request gh:smw:4078
  4. ^  | | | | | | | | |  Semantic MediaWiki: GitHub pull request gh:smw:6793
  5. a b  Semantic MediaWiki: GitHub issue gh:smw:3722