Search feature "SMWSearch"

From Linux Web Expert

Template:Interlanguagelink: en

Search feature information
This page describes the "SMWSearch" feature, i.e an search engine to allow semantic queries directly from MediaWiki's standard search interface.
Collection
Keywords

The SMWSearch feature is supported since Semantic MediaWiki 2.1.0Released on an unknown date unknown versions of MediaWiki1. It provides a search engine to allow semantic queries directly from MediaWiki's standard search by trying to interpret the search term as a semantic query. If successful, the pages according to the query will be returned, if not it will fall back to the default search engine.

Special page "Search" will show an informatory message2 including a cheat sheet3 in case this feature was enabled as well as the optional input assistance feature starting with Semantic MediaWiki 3.0.0Released on an unknown date unknown versions of MediaWiki. The informatory message for the search including the a cheat sheet may be disabled by a user via the respective user preference.4

More importantly Semantic MediaWiki 3.0.0Released on an unknown date unknown versions of MediaWiki also brought a full-text search on unstructured data, i.e. content not stored semantically via annotations, indicated by syntax element in:.5

Usage

Entering [[Category:City]] [[Located in::Germany]] into the standard search field of the wiki's skin or on special page "Search" will return all pages matching these selection parameters together with additional page content, e.g. if used on this wiki: click here.

The selection of pages will match the following inline query:

{{#ask:
 [[Category:City]]
 [[located in::Germany]]
}}

Entering [[Category:City]] [[Located in::Germany]] [[in:Points of interest]] will additionally highlight "Points of interest" within the additional page content shown for the pages resulting from the search.

The display of results will be styled as special page "Search" usually outputs search results.

Configuration

Users of "SMWSearch" should use the following configuration settings in their "LocalSettings.php" file after the enableSemantics() call:

$wgSearchType = 'SMWSearch';
$smwgFallbackSearchType = null; // default
// The two next parameters are recommended to highlight excerpts
$smwgElasticsearchConfig['query']['highlight.fragment']['type'] = 'plain'; // or 'unified' or 'fvh'
$smwgElasticsearchConfig['indexer']['raw.text'] = true;

See also

#scite could not render a citation text for reference "gh:smw:450" because type "pullrequest" was not assigned to a template.
#scite could not render a citation text for reference "gh:smw:2738" because type "pullrequest" was not assigned to a template.
#scite could not render a citation text for reference "gh:smw:3116" because type "pullrequest" was not assigned to a template.
#scite could not render a citation text for reference "gh:smw:3120" because type "pullrequest" was not assigned to a template.
#scite could not render a citation text for reference "gh:smw:3123" because type "pullrequest" was not assigned to a template.

References

  1. ^ gh:smw:450 
  2. ^ gh:smw:2738 
  3. ^ gh:smw:3123 
  4. ^ gh:smw:3120 
  5. ^ gh:smw:3116