Special page "SearchByProperty"

From semantic-mediawiki.org
SearchByProperty
Allows to search the wiki by properties or property value combinations
Image collection
Further Information
Provided by: Semantic MediaWiki
Added: 1.1.0
Removed: still available
In this wiki: Special:SearchByProperty



SearchByProperty is a special page that allows to search the wiki by properties or property value combinations. This special page was introduced in Semantic MediaWiki 1.1.0Released on 21 April 2008 and compatible with MW 1.10.x - 1.13.x.. Substantial improvements of the user interface and its behaviour were introduced with Semantic MediaWiki 2.1.0Released on 19 January 2015 and compatible with MW 1.19.0 - 1.24.x..1

It provides a simple search form for finding semantic backlinks. Users may use it in two ways:

  1. Enter a property name assisted by autocompletion on existing properties to get a list of all values stored with the particular property
  2. Enter a property name and a target value to get a list of all pages that have that property with that value.

This service is directly accessible through the link within the factbox (see example at the bottom of this page) or on special page "Browse"No description was provided. (see this example).

If you search for a property 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, and there are only few results, the nearest results will be shown as well. This can be adjusted by changing the setting for configuration parameter $smwgSearchByPropertyFuzzySets whether special page "Search by property" should display nearby results in your "LocalSettings.php" file.

Since Semantic MediaWiki 1.9.0Released on 3 January 2014 and compatible with MW 1.19.0 - 1.22.x. the search form is using autocompletion for search suggestions on properties is using the property lookup cache for performance reasons which is governed by configuration parameter $smwgCacheUsageSets how the caching behaviour or special pages related to Semantic MediaWiki is controlled.

If you want to link to the special page, you need to encode spaces with "-20", and not with usual URL encodings. E. g. Special:SearchByProperty/:Has point of interest/Brandenburg-20Gate 2

Since Semantic MediaWiki 7.4.0Released on 2 November 2026 and compatible with MW 1.43.x - 1.46.x., the #property_search_link parser function creates such a link for any value, so nothing has to be encoded by hand.3 See below.

The #property_search_link parser function

Since Semantic MediaWiki 7.4.0Released on 2 November 2026 and compatible with MW 1.43.x - 1.46.x..3

{{#property_search_link: Foo |Bar }} renders a link to this special page, which lists the pages that have the property “Foo” with the value “Bar”. Any value works, including values with characters such as /, # or [ that a hand-written link cannot carry. A label can be added, and the value left out:

Syntax
{{#property_search_link: Has point of interest |Brandenburg Gate }}
{{#property_search_link: Has point of interest |Brandenburg Gate |Cities with this landmark }}
{{#property_search_link: Has point of interest }}
Result

The first call renders the link “Brandenburg Gate”, the second renders it with the label “Cities with this landmark”, and the third renders the link “Has point of interest” to the list of all values of the property.

  • The label is display text only. Annotation syntax inside it, such as [[Bar::Baz]], is shown as its text and does not create an annotation.
  • Page name magic words such as {{FULLPAGENAME}} work as the value, so a template can link to the pages that refer to the page it is used on.
  • An empty property name renders nothing.

References

  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:537
  2. ^  Semantic MediaWiki: GitHub issue gh:smw:5781
  3. a b  Semantic MediaWiki: GitHub pull request gh:smw:7179

Cookies help us deliver our services. By using our services, you agree to our use of cookies.