Difference between revisions of "MediaWiki/Search"

From Freephile Wiki
Jump to navigation Jump to search
(Summary of search features in MediaWiki)
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[File:Albert_Einstein_Head.jpg|thumb|Albert Einstein]]
 
 
== Interwiki ==
 
== Interwiki ==
{{Messagebox
 
| type = success
 
| text = You can search all linked wikis '''directly''' from the search box.  Just enter the [{{fullurl:Special:Interwiki}} interwiki prefix], followed by a colon.  <code><nowiki>wp: roses</nowiki></code> searches WikiPedia for "roses" and takes you there.
 
}}
 
 
MediaWiki has an [[Help:Links#Interwiki_links|interwiki prefix]] system that lets you search, or link to, external wiki content. And it doesn't have to be "wiki"; it just has to be structured.  So, because we have an entry for 'Google' in our interwiki table, you can link to Google results with [[Google:"Rail+Trail"+Paths+In+Salisbury+Massachusetts]].   
 
MediaWiki has an [[Help:Links#Interwiki_links|interwiki prefix]] system that lets you search, or link to, external wiki content. And it doesn't have to be "wiki"; it just has to be structured.  So, because we have an entry for 'Google' in our interwiki table, you can link to Google results with [[Google:"Rail+Trail"+Paths+In+Salisbury+Massachusetts]].   
  
And you can '''search Google''' directly from the search bar of this wiki:  Just enter the "shortcode" (Google), followed by a colon (:), and your search query.  This works for [[Special:Interwiki|ALL interwiki prefixes]].  So, to search Wikipedia for "''roses''", just enter '<code>w:roses</code>' in the search bar.
+
And you can '''search Google''' directly from the search bar of this wiki:  Just enter the "shortcode" (Google), followed by a colon (:), and your search query.  This works for ALL interwiki prefixes.  So, to search Wikipedia for "''roses''", just enter '<code>w:roses</code>' in the search bar.
  
 
== Templates ==
 
== Templates ==
 
Templates are useful for linking other search engines. See [[Help:External_searches]] for example.  You can create a template that makes it convenient for editors to post links to search or database query results in the wiki.
 
Templates are useful for linking other search engines. See [[Help:External_searches]] for example.  You can create a template that makes it convenient for editors to post links to search or database query results in the wiki.
  
== Help ==
+
== Application (Internal) Native Search ==
[[mw:Search|Search]] helps you learn and understand the search capabilities of MediaWiki
+
The default search system for MediaWiki is based on [[MySQL]] database technology; and is not the most powerful search engine.  To make it better, use the [[ElasticSearch]] system instead.
 
 
== CirrusSearch ==
 
We use CirrusSearch as the backend to enhance the search capability. One of the things you can do is view the [{{SERVER}}{{SCRIPTPATH}}/api.php?action=cirrus-mapping-dump Cirrus Mapping] through the API.  Or, look at the [{{SERVER}}/wiki/{{FULLPAGENAMEE}}?action=cirrusdump cirrus properties] for a given page. For more info, see [[CirrusSearch]] or [[mw:API:Search_and_discovery]].  One thing you may need to do, depending on your usage of redirects and namespaces is to enable <code>$wgCirrusSearchUseCompletionSuggester</code> see https://phabricator.wikimedia.org/T146678 or look at https://github.com/wikimedia/mediawiki-extensions-CirrusSearch/blob/master/tests/jenkins/FullyFeaturedConfig.php for more.
 
 
 
== the "Suggest" feature ==
 
The MediaWiki system now includes a 'suggest' feature while you type in the search box.  You control this UPO in your [[Special:Preferences|user preference settings]].
 
 
 
== Direct Access ==
 
MediaWiki provides an 'OpenSearch' implementation. This means that you can use your browser's search toolbar to directly search any instance of MediaWiki.  In other words, you can make this site's search engine your default search engine in your browser.  You can also switch back and forth between the various "search engines" (aka sites the implement OpenSearch) that are configured in your browser; e.g. [https://support.google.com/chrome/answer/95426?hl=en instructions for Google Chrome].  This can be extremely useful for work.  If you've got MediaWiki setup as your internal knowledge base, it's a big benefit to have all user desktops automatically use that knowledge base as their preferred search engine!
 
 
 
== Implementors ==
 
 
 
The default search system for MediaWiki is based on [[MySQL]] database technology; and is not the most powerful search engine.  To make it better, use the [[ElasticSearch]] system instead. Like the MediaWiki project, '''this site uses [[Elasticsearch]] as the underlying search engine''' instead of the default search packaged with MediaWiki.
 
 
 
If customizing a whole search service is too much work, note that the simplest enhancement you can make to a small-scale installation is to tweak the MySQL stopwords and word-length.
 
 
 
If you're a sysop for a MediaWiki site, you probably want to install the [[mw:Extension:Replace_Text]] so that you can search and replace strings in your content.
 
 
 
== Foundation Project ==
 
The [https://wikimediafoundation.org/wiki/Staff_and_contractors Wikimedia Foundation has a team] called [[mw:Wikimedia Discovery|Wikimedia Discovery]] devoted to search technology.
 
 
 
As of Feb. 2016, it was revealed that the Wikimedia Foundation is working on a [https://m.wikimediafoundation.org/wiki/File:Knowledge_engine_grant_agreement.pdf grant-funded] project to improve [[Elasticsearch]] with additional sources of free data and knowledge on the Internet. See [[mw:Wikimedia Discovery/FAQ|Wikimedia Discovery/FAQ]]
 
 
 
[[Category:Search]]
 
[[Category:Wiki]]
 

Revision as of 15:01, 16 February 2016

Interwiki[edit | edit source]

MediaWiki has an interwiki prefix system that lets you search, or link to, external wiki content. And it doesn't have to be "wiki"; it just has to be structured. So, because we have an entry for 'Google' in our interwiki table, you can link to Google results with Google:"Rail+Trail"+Paths+In+Salisbury+Massachusetts.

And you can search Google directly from the search bar of this wiki: Just enter the "shortcode" (Google), followed by a colon (:), and your search query. This works for ALL interwiki prefixes. So, to search Wikipedia for "roses", just enter 'w:roses' in the search bar.

Templates[edit | edit source]

Templates are useful for linking other search engines. See Help:External_searches for example. You can create a template that makes it convenient for editors to post links to search or database query results in the wiki.

Application (Internal) Native Search[edit | edit source]

The default search system for MediaWiki is based on MySQL database technology; and is not the most powerful search engine. To make it better, use the Elasticsearch system instead.