Help:Configuration parameter "$smwgQFeatures"

From semantic-mediawiki.org
Jump to: navigation, search
edit with form (experimental)


Title $smwgQFeatures
Description Defines which query features should be available by default.
Default setting See below
Software Semantic MediaWiki
First version supported 1.2.0
Last version supported still available
Configuration Query settings · inline queries
Keyword Inline queries · Special Ask · queries · Query features · Query performance

$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

$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 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 ||.