Help:$smwgQFeatures

From semantic-mediawiki.org
Jump to: navigation, search
Title $smwgQFeatures
Description Defines which query features should be available by default.
Default setting see documentation
Software Semantic MediaWiki
Introduced with 1.2.0
Deprecated with still available
Configuration Query settings · Inline queries
Keyword Inline queries · Special Ask · Queries · Query features · Query performance
Referenced by N/A

$smwgQFeatures is a configuration parameter that is used to define which query features should be available by default to inline queries and special page "Ask". The parameter was introduced in Semantic MediaWiki 1.2.0.

Default setting

$GLOBALS['smwgQFeatures'] = SMW_PROPERTY_QUERY | SMW_CATEGORY_QUERY | SMW_CONCEPT_QUERY | SMW_NAMESPACE_QUERY | SMW_CONJUNCTION_QUERY | SMW_DISJUNCTION_QUERY;

The default setting allows all basic features.

Changing the default setting

The available features are combined in a list, separated by a pipe "|". Examples:

allow only category intersections
$smwgQFeatures = SMW_CATEGORY_QUERY | SMW_CONJUNCTION_QUERY;
allow only concept queries (possibly cached)
$smwgQFeatures = SMW_CONCEPT_QUERY;
allow anything but disjunctions
$smwgQFeatures = SMW_ANY_QUERY & ~SMW_DISJUNCTION_QUERY;

Available setting constants

  • SMW_PROPERTY_QUERY for conditions of the form [[Property::...]],
  • SMW_CATEGORY_QUERY for conditions of the form [[Category:...]],
  • SMW_CONCEPT_QUERY for conditions of the form [[Concept:...]],
  • SMW_NAMESPACE_QUERY for conditions of the form [[Namespace:+]],
  • SMW_CONJUNCTION_QUERY for combinations of multiple conditions in one query,
  • SMW_DISJUNCTION_QUERY for queries using OR or ||.


This documentation page applies to all SMW versions from 1.2.0 to the most current version.
     

Help:$smwgQFeatures en 1.2.0