Forskel mellem versioner af "Hjælp:Søg"

Fra BYG-ERFA wiki
Skift til: navigering, søgning
Linje 1: Linje 1:
{{H:h|Reader toc}}
+
{{PD Help Page}}
 +
The quickest way to find information in MediaWiki is to look it up directly. On the left-hand side of your screen there is a '''Search''' box with two buttons under it labeled "Go" and "Search".
  
==Search facilities in MediaWiki ==
+
<div style="border:1px solid #ababff; background: #fdfdff; padding: 1em; margin: 1.1em 1em 1em 0em; font-size:105%">
The description below applies when [[m:Installing lucene search|lucene search]] has been installed, like on the Wikimedia sites.
+
Put your keyword in the searchbox.
 +
* <font face="MS Sans Serif,Arial">'''Go'''</font> - (or ''Enter'' on keyboard) will take you automatically to the article, if it exists.
 +
* <font face="MS Sans Serif,Arial">'''Search'''</font> - will search the text of all pages on the wiki (with some restrictions, see below).
 +
</div>
  
On every page there is a search button with search box.
+
If you clicked 'search', or you clicked 'go' and the page you were looking for did not exist, you will be presented with a list of articles that matched your search criteria (or a message that no matches were found).
  
See also "Search result settings" section in the [[Help:Preferences|preferences]].
 
  
==Tips==
+
== How it works ==
===Avoid short and common words===
+
Here's how the search works:
This is the most likely cause of an unexpected failed search.
 
If your search terms include a common "stop word" (such as "the", "one", "your", "more", "right", "while", "when", "who", "which",
 
"such", "every", "about", "onto"), then your search will fail without any
 
results. Short numbers, and words that appear in half of all pages, will also not be found.
 
In this case, drop those words and rerun the search.
 
  
 +
* Only the article content is searched - the page title is ignored.
 +
* The article content is searched in its raw (wikitext) form - i.e. it searches the text that appears in the edit box when you click 'edit', not the rendered page.  This means that content coming from an included template will not be picked up, but the target of piped links will be.
 +
* Even if you enclose a phrase in quotes, the search looks for each word individually.  e.g. if you enter "world war 2" it will return pages that contain "world" and "war" and "2".
 +
* The search is not case-sensitive, so "MediaWiki", "mediawiki" and "MEDIAWIKI" all give the same result.
  
See [[Help:Common words, searching for which is not possible]] for the stop words filtered out by the database. From there one can at least go to a page with a stop word as title. Searching for the combination of one or more words and the common word "not" give a database query syntax error due to a bug in the software.
+
== Restricting the search ==
 +
If you click the 'Search' button without filling in anything, you will be taken to 'Special:Search' which gives you extra searching options (also available from any search results list)
  
See [[Help:Short words in searches]] for a procedure to allow MySQL to index words shorter than four letters.
+
You may find it useful to restrict a search to pages within a particular [[Help:Namespaces|namespace]] e.g. only search within the 'Talk' pages. Tick the namespaces you require for this search.  
  
===Search is case-insensitive===
+
By default only the [[Help:Namespaces|namespaces]] specified in your [[Help:Preferences|preferences]] will be searched.  Logged-in users can change their preferences to specify the namespaces they want to search by default.
The searches for "fortran", "Fortran" and "FORTRAN" all return the same results.
 
  
<!-- ===Boolean search possible===
+
==External links==
You can use the words "and", "or" and "not" and parentheses in order to
+
{{meta|Help:Searching}}
formulate more complicated requests.
+
__NOTOC__
If none of those words is specified, "and" is used by default.
+
{{Languages|Help:Searching}}
For instance, "indian not american" will return all pages that contain the
 
word "indian" but don't contain the word "american".
 
The search "(Adolph or Adolf) and Hitler" will return all pages which
 
contain "Hitler" and either "Adolf" or "Adolph".
 
-->
 
  
===Words with special characters===
+
[[Category:Help|Searching]]
In a search for a word with a [[w:diaeresis|diaeresis]], such as Sint Odili&euml;nberg, it depends whether this ë is stored as one character or as "&amp;euml;". In the first case one can simply search for Odilienberg (or Odili&euml;nberg); in the second case it can only be found by searching for Odili, euml and/or nberg.  This is actually a bug that should be fixed -- the entities should be folded into their raw character equivalents so all searches on them are equivalent. See also [[Help:Special characters]].
+
[[Category:Search]]
 
 
 
 
=== Phrase ===
 
Search for a phrase by enclosing it in double quotation marks.
 
 
 
===Wildcard===
 
You can use a wildcard *, at the end of a search term only. To search for pages with the words "boat" or "boats" search like this: "boat*". You cannot use "*boat" to find Riverboat, etc.
 
 
 
==Searching limitations and Gotchas==
 
 
 
===No regular expressions===
 
You cannot use [[w:regular expression|regular expression]]s.
 
 
 
===Words in single quotes===
 
If a word appears in a page with single quotes, you can only find it if you search for the word with quotes. Since this is rarely desirable it is better to use double quotes in pages, for which this problem does not arise.
 
 
 
An apostrophe is identical to a single quote, therefore Mu'ammar can be found searching for exactly that (and not otherwise). A word with apostrophe s is an exception in that it can be found also searching for the word without the apostrophe and the s.
 
 
 
===Delay in updating the search index===
 
For reasons of efficiency and priority, very recent changes to pages are not always immediately taken into account in searches.
 
 
 
==Search options ==
 
===Namespaces searched===
 
The search only applies to the [[Help:Namespace|namespace]]s selected in the [[Help:Preferences|preferences]]. To search the other namespaces check or uncheck the tickboxes in "Search in namespaces" box found at the bottom of a search results page. Depending on the browser, a box may still be checked from a previous search, but may no longer be effective. To be sure the box is in effect, uncheck and recheck it.
 
 
 
Searching the image namespace means searching the image descriptions, i.e. the first parts of the image pages. For searching the titles, use [[Special:Imagelist]].
 
 
 
Searching in single namespaces can also be achieved by typing the namespace, a colon, then the search term in the search box. For example, typing "Talk:Foo" will give all pages containing "foo" in the talk namespace.
 
 
 
The URL for searching a particular namespace is
 
 
 
{{FULLURL:Special:Search}}?ns0=1&ns1=1&ns2=1&ns3=1&ns4=1&ns5=1&ns6=1&ns7=1&ns8=1&ns9=1&ns10=1&ns11=1&ns12=1&ns13=1&ns14=1&ns15=1&fulltext=Search&search=qqq
 
 
 
where "qqq" is used as example for the search term, and the namespaces to be searched are specified.
 
 
 
Thus, e.g.
 
 
 
{{FULLURL:Special:Search}}?ns10=1&ns11=1&fulltext=Search&search=test
 
 
 
searches the Template and Template talk namespaces for "test", and
 
 
 
{{FULLURL:Special:Search}}?ns6=1&fulltext=Search&search=jpg
 
 
 
searches the image description pages for "jpg".
 
 
 
To search the Help pages use {{FULLURL:Special:Search}}?ns12=1&fulltext=Search&search=x and replace the x in the URL by the search term. Replacing it in the search box does not work the same: the search is then in the namespaces specified in the preferences, instead of just in the help namespace.
 
 
 
For each namespace: [http://meta.wikimedia.org/wiki/Special:Search?ns0=1&ns1=1&ns2=1&ns3=1&ns4=1&ns5=1&ns6=1&ns7=1&ns8=1&ns9=1&ns10=1&ns11=1&ns12=1&ns13=1&ns14=1&ns15=1&ns100=1&ns101=1&ns102=1&ns103=1&ns104=1&ns105=1&ns106=1&ns107=1&ns108=1&ns109=1&ns110=1&ns111=1&ns112=1&ns113=1&ns114=1&ns115=1&ns116=1&ns117=1&ns118=1&ns119=1&ns120=1&ns121=1&ns122=1&ns123=1&ns124=1&ns125=1&ns126=1&ns127=1&ns128=1&ns129=1&search=x&fulltext=Search all] [http://meta.wikimedia.org/w/index.php?title=Special%3ASearch&ns0=1&&fulltext=Search&search=x 0]
 
[http://meta.wikimedia.org/w/index.php?title=Special%3ASearch&ns1=1&&fulltext=Search&search=x 1]
 
[http://meta.wikimedia.org/w/index.php?title=Special%3ASearch&ns2=1&&fulltext=Search&search=x 2]
 
[http://meta.wikimedia.org/w/index.php?title=Special%3ASearch&ns3=1&&fulltext=Search&search=x 3]
 
[http://meta.wikimedia.org/w/index.php?title=Special%3ASearch&ns4=1&&fulltext=Search&search=x 4]
 
[http://meta.wikimedia.org/w/index.php?title=Special%3ASearch&ns5=1&&fulltext=Search&search=x 5]  
 
[http://meta.wikimedia.org/w/index.php?title=Special%3ASearch&ns6=1&&fulltext=Search&search=x 6]
 
[http://meta.wikimedia.org/w/index.php?title=Special%3ASearch&ns7=1&&fulltext=Search&search=x 7]  
 
[http://meta.wikimedia.org/w/index.php?title=Special%3ASearch&ns8=1&&fulltext=Search&search=x 8]
 
[http://meta.wikimedia.org/w/index.php?title=Special%3ASearch&ns9=1&&fulltext=Search&search=x 9]
 
[http://meta.wikimedia.org/w/index.php?title=Special%3ASearch&ns10=1&&fulltext=Search&search=x 10]
 
[http://meta.wikimedia.org/w/index.php?title=Special%3ASearch&ns11=1&&fulltext=Search&search=x 11]
 
[http://meta.wikimedia.org/w/index.php?title=Special%3ASearch&ns12=1&&fulltext=Search&search=x 12]
 
[http://meta.wikimedia.org/w/index.php?title=Special%3ASearch&ns13=1&&fulltext=Search&search=x 13]
 
[http://meta.wikimedia.org/w/index.php?title=Special%3ASearch&ns14=1&&fulltext=Search&search=x 14]
 
[http://meta.wikimedia.org/w/index.php?title=Special%3ASearch&ns15=1&&fulltext=Search&search=x 15]
 
 
 
(Also there is a special search feature [[Special:Imagelist]], which searches in titles, regardless of whether there is an image description.)
 
 
 
===Languages searched===
 
 
 
See the feature request at [[MediaZilla:1837]].
 
 
 
===Redirects can be excluded===
 
Check or uncheck the tickbox "List redirects" in "Search in namespaces" box found at the bottom of a search results page.
 
 
 
===The wikitext is searched===
 
The [[w:wikitext|wikitext]] (source text, what one sees in the edit box) is searched. This distinction is relevant for [[Help:Piped link|piped links]], for [[Help:Interwiki linking|interlanguage link]]s, [[Help:Special characters|special characters]] (if ê is coded as &amp;ecirc; it is found searching for ecirc), etc.
 
 
 
===Highlighting===
 
Some portions of matching pages that contain the searched-for terms are shown, with the terms highlighted in red. You can set the number of lines extracted and the amount of text per line shown in your [[special:preferences|preferences]].
 
 
 
If you search e.g. for "book" you get only pages with that word, not pages with "books" only. However, on pages with "book" and "books", also the part "book" of the word "books" is highlighted.
 
 
 
==Other possibilities==
 
=== list of all pages ===
 
*'''[[Special:Allpages]] - Alphabetic index for the main namespace'''
 
 
 
Please note that a-z come after A-Z.
 
 
 
For some other namespaces, see [[Help:Namespace]].
 
 
 
=== Go button ===
 
See also [[Help:Go button]].
 
 
 
=== Search field ===
 
Pressing the [Enter] key while the search field is active is equivalent to clicking on the [Go] button.  While this is obvious when using Internet Explorer (tested on version 6), Mozilla (version 1.6 at least) provides no such indication.
 
 
 
==Search engines ==
 
===Google===
 
 
 
The [[w:URL|URL]]
 
: http://www.google.com/search?q=site%3Awikipedia.org+%22interwiki+link%22
 
searches for the phrase ''interwiki link'' in '''wikipedia.org''' &mdash; that is, in all Wikipedias as well as Wikisource ('''sources.wikipedia.org''') and '''meta.wikipedia.org''', but not '''meta.wiki''media''.org'''.
 
 
 
'''%3A''' is a colon (:), '''%22''' a double quotation mark ("), and '''+''' is equivalent to a space (&nbsp;); '''%20''' may also be used for a space. (See also [[Help:URL]].)
 
 
 
Note that the underscore (_) is ''not'' equivalent to a space: putting it in the URL results in a search for a word containing actual underscores at those positions. Thus
 
: http://www.google.com/search?q=site%3Awikipedia.org+%22interwiki_link%22
 
finds pages containing the term ''interwiki_link''.
 
 
 
In an interwiki link with prefix "google:", a double quotation mark (") is again written '''%22''', but now a space needs to be written "&amp;nbsp;".
 
 
 
====Examples====
 
 
 
Searching for the phrase "michael jackson":
 
 
 
:http://www.google.com/search?q=%22michael+jackson%22
 
 
 
:http://www.google.com/search?q=%22michael%20jackson%22
 
 
 
:<nowiki>[[</nowiki>google:%22michael&amp;nbsp;jackson%22]] giving [[google:%22michael&nbsp;jackson%22]]
 
 
 
Searching for first term only:
 
 
 
:http://www.google.com/search?q=%22michael jackson%22
 
 
 
Searching for two terms, not the phrase:
 
 
 
:http://www.google.com/search?q=michael+jackson
 
 
 
:http://www.google.com/search?q=michael%20jackson
 
 
 
Searching for phrase with underscore:
 
 
 
:http://www.google.com/search?q=michael_jackson
 
 
 
====Thumbnails in Google cache====
 
 
 
Browse Wikipedia images with thumbnails in Google cache: [http://images.google.com/images?as_q=png&svnum=100&hl=en&ie=UTF-8&oe=UTF-8&newwindow=1&btnG=Google+Search&as_epq=&as_oq=&as_eq=&imgsz=&as_filetype=&imgc=&as_sitesearch=en.wikipedia.org&safe=off png]
 
[http://images.google.com/images?hl=en&lr=&ie=UTF-8&oe=UTF-8&newwindow=1&safe=off&q=jpg+site%3Aen.wikipedia.org jpg]
 
[http://images.google.com/images?hl=en&lr=&ie=UTF-8&oe=UTF-8&newwindow=1&safe=off&q=gif+site%3Aen.wikipedia.org gif]
 
 
 
Each thumbnail links to an image result page, which links both to the Wikipedia image page and to the image itself on Wikimedia.
 
 
 
===Wikimedia-Search===
 
* [http://tools.wikimedia.de/~kolossos/tree/search.php?pro=wikipedia&langauswahl=en Wikimedia-Search] with suggest-function, all projects in real-time
 
 
 
== Administration Options ==
 
 
 
from includes/DefaultSettings.php, apparently you have to look up your namespace table, because they are numbered...
 
 
 
<pre>
 
$wgNamespacesToBeSearchedDefault = array( -1 => 0, 0 => 1, 1 => 0,
 
  2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 1, 10 => 0, 11 => 1 );
 
</pre>
 
 
 
I would guess that -1 is the default settings.. and 0 is main namespace.. and 0 is off and 1 is on.
 
 
 
==See also==
 
 
 
*[[m:Searchindex table]]
 
 
 
{{h:f|enname=Searching}}<!--When translating leave this line intact-->
 
[[Category:Navigation
 

Versionen fra 1. apr 2008, 23:10

Skabelon:PD Help Page The quickest way to find information in MediaWiki is to look it up directly. On the left-hand side of your screen there is a Search box with two buttons under it labeled "Go" and "Search".

Put your keyword in the searchbox.

  • Go - (or Enter on keyboard) will take you automatically to the article, if it exists.
  • Search - will search the text of all pages on the wiki (with some restrictions, see below).

If you clicked 'search', or you clicked 'go' and the page you were looking for did not exist, you will be presented with a list of articles that matched your search criteria (or a message that no matches were found).


How it works

Here's how the search works:

  • Only the article content is searched - the page title is ignored.
  • The article content is searched in its raw (wikitext) form - i.e. it searches the text that appears in the edit box when you click 'edit', not the rendered page. This means that content coming from an included template will not be picked up, but the target of piped links will be.
  • Even if you enclose a phrase in quotes, the search looks for each word individually. e.g. if you enter "world war 2" it will return pages that contain "world" and "war" and "2".
  • The search is not case-sensitive, so "MediaWiki", "mediawiki" and "MEDIAWIKI" all give the same result.

Restricting the search

If you click the 'Search' button without filling in anything, you will be taken to 'Special:Search' which gives you extra searching options (also available from any search results list)

You may find it useful to restrict a search to pages within a particular namespace e.g. only search within the 'Talk' pages. Tick the namespaces you require for this search.

By default only the namespaces specified in your preferences will be searched. Logged-in users can change their preferences to specify the namespaces they want to search by default.

External links

Skabelon:Meta

Skabelon:Languages