Help:Con­figu­ration para­meter "$smwgSearchByPropertyFuzzy"

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


Title $smwgSearchByPropertyFuzzy
Description Sets whether special page "Search by property" should display nearby results
Default setting See below
Software Semantic MediaWiki
First version supported
Last version supported still available
Configuration Interface settings · Facts display
Keyword interface settings · special page

$smwgSearchByPropertyFuzzy is a configuration parameter that is used to set whether the special page "SearchByProperty"Allows to search the wiki by properties or property value combinations special page should display nearby results if there are only few results available. The setting was introduced in Semantic MediaWiki 1.1.0Released on 21 April 2008 and compatible with MW 1.10.x - 1.13.x.. It may be switched off if this special page has performance problems.

Starting with Semantic MediaWiki 2.1.0Released on 19 January 2015 and compatible with MW 1.19.0 - 1.24.x. this setting works for properties of datatype "Number"Holds integer and decimal numbers, with an optional exponent, datatype "Text"Holds text of arbitrary length or datatype "Date"Holds particular points in time.1 Before that only properties of datatype "Number"Holds integer and decimal numbers, with an optional exponent displayed nearby results.

The default setting for this configuration parameter was changed starting with Semantic MediaWiki 2.1.0Released on 19 January 2015 and compatible with MW 1.19.0 - 1.24.x..1 See this version of the documentation available for releases prior to Semantic MediaWiki 2.1.0Released on 19 January 2015 and compatible with MW 1.19.0 - 1.24.x..

Default setting

$smwgSearchByPropertyFuzzy = array( '_num', '_txt', '_dat' );

This means that this feature is enabled for properties of datatype "Number"Holds integer and decimal numbers, with an optional exponent, datatype "Text"Holds text of arbitrary length and datatype "Date"Holds particular points in time.

Changing the default setting

To modify this configuration setting, add one of the following lines to your "LocalSettings.php" file after the enableSemantics() call:

Starting with Semantic MediaWiki 2.1.0Released on 19 January 2015 and compatible with MW 1.19.0 - 1.24.x. the default setting may be changed to another set of datatypes. There are different possibilities to do so by redefining the existing configuration with a different set of labels corresponding to the respective datatypes as shown in the configuration examples below.
Change the feature for properties of selected datatypes only
$smwgSearchByPropertyFuzzy = array( '_num', '_dat' );

This means that this feature is enabled for properties of datatype "Number"Holds integer and decimal numbers, with an optional exponent and datatype "Date"Holds particular points in time.

Change the feature for properties of selected datatype only
$smwgSearchByPropertyFuzzy = array( '_num' );
This means that this feature is enabled for properties of datatype "Text"Holds text of arbitrary length.
NoteNote: This setting is equivalent to the behavior in earlier versions than Semantic MediaWiki 2.1.0Released on 19 January 2015 and compatible with MW 1.19.0 - 1.24.x..
Disable the feature
$smwgSearchByPropertyFuzzy = array( );

References

  1. a b  Semantic MediaWiki: GitHub pull request gh:smw:537