Status: | effective |
Progress: | 100% |
Version: | 3.0.0+ |
$smwgQSortFeatures
Configuration parameter details: | |
Name | $smwgQSortFeatures |
Description | Property "Has description" (as page type) with input value "Sets the behaviour for the sorting features of the [[Help:Semantic search|semantic search" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process. |
Default setting | See below |
Software | Has component::Semantic MediaWiki |
Since version | |
Until version | still available |
Configuration | Query settings |
Keyword | query · sorting · semantic search |
__NOBREADCRUMBLINKS__
$smwgQSortFeatures
is a configuration parameter that sets behaviour for the sorting features of the semantic search. The configuration parameter was introduced in Semantic MediaWiki 3.0.0Released on an unknown date unknown versions of MediaWiki1 and deprecated the configuration parameters as indicated in the section on available options below.
Default setting
$smwgQSortFeatures = SMW_QSORT | SMW_QSORT_RANDOM;
This means that the two respective features, as explained in the following sections on available options, are enabled.
Available options
SMW_QSORT_NONE
– Disables sorting features of the semantic searchSMW_QSORT
– Sets that sorting of query results is possible
- This option replaces configuration parameter
$smwgQSortingSupport
No description was provided..
SMW_QSORT_RANDOM
– Sets that random sorting of query results is possible
- This option replaces configuration parameter
$smwgQRandSortingSupport
No description was provided..
SMW_QSORT_UNCONDITIONAL
– Sets that sorting by a property will work unconditionally even if the respective property was not set to all pages selected, i.e. all pages will be shown2
- This option is currently considered experimental and not available to
SPARQLStore
stores andSMWElasticStore
store.
Changing the default setting
To modify the setting to this configuration parameter, add one of the following lines to your "LocalSettings.php" file after the enableSemantics()
call:
- Removing a specific query sorting feature
To disable a specific feature e.g. random sorting of query results just redefine the configuration parameter by defining it without the corresponding constant as shown in the above section on available options:
$smwgQSortFeatures = SMW_QSORT;
or alternatively remove the option from the existing definition of the configuration parameter like e.g.
$smwgQSortFeatures = ( $smwgQSortFeatures & ~SMW_QSORT_RANDOM );
- Adding a specific query sorting feature
To add a specific feature e.g. unconditional sorting of query results just redefine the configuration parameter by defining it including the corresponding constant as shown in the above section on available options:
$smwgQSortFeatures = $smwgQSortFeatures | SMW_QSORT_UNCONDITIONAL;
- Disabling all query sorting features
To disable all browse features just remove all constants as shown in the above section on available options:
$smwgQSortFeatures = '';
or add the constant for disabling all query sorting features
$smwgQSortFeatures = SMW_QSORT_NONE;
See also
- Help page on semantic search
- Help page on configuration parameter
$smwgQSortingSupport
No description was provided. - Help page on configuration parameter
$smwgQRandSortingSupport
No description was provided.
References
- a b gh:smw:2821
- ^ gh:smw:2823
- ^ Bitwise Operators to use parentheses to ensure the desired precedence ...