Jump to content

Help:Advanced search

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by The Transhumanist (talk | contribs) at 06:08, 16 March 2018 (Stemming: removed content fork --> provide link to main section with this info). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The Wikipedia page-search feature (aka WikiSearch) has some advanced features to tailor searches to "prefix:" word-prefixes or "intitle:" words within a page name. The advanced-search URL is as follows:

In that URL, the option "profile=advanced" shows the screen for advanced-search options, with a checklist to select which wp:namespace of pages to search.

Overview of features

Wikipedia special search box
Special search box just for Search, with the general search domains listed below. Click on one to search that domain.
Some Wikipedia simplified search options
Clicking on Advanced shows the namespaces of the wiki. Check namespaces to set either your current or your default search domain.

The internal search engine can search for parts of page titles or page title prefixes, and in specific categories and namespaces. It can also limit a search to pages with specific words in the title or located in specific categories or namespaces. It can handle parameters an order of magnitude more sophisticated than most external search engines, including user-specified words with variable endings and similar spellings. When presenting results, the internal search understands and will link to relevant sections of a page (although to a limited degree some other search engines may do this as well).

The internal search is also able to search all pages for project purposes, whereas external search engines cannot be used on any talk page, a large part of projectspace, and any page tagged as noindex.

The source text (as shown in the edit box) is searched for. This distinction is relevant for piped links, for interlanguage links (to find links to Chinese articles, search for zh, not for Zhongwen), special characters (if ê is coded as ê it is found searching for ecirc), etc. Entering an article title will jump to that article; to display a list of matches to the search term instead, prefixing the search term with - or ~ (see "Avoiding automatic direction to page" below) will force a full search.

Upper and lower case as well as some diacritical marks such as umlauts and accents are disregarded in search. For example, a search for citroen will find pages containing the word Citroën (c = C, e = ë). Some ligatures match the separate letters. For example, a search for aeroskobing will find pages containing Ærøskøbing (ae = Æ).

Many non-alphanumerical characters are ignored. It is not possible to search for the string |LT| (letters LT between two pipe symbols) as used in some unit-conversion templates for long tons; all articles with lt will be returned. Some characters are treated differently; Credit (finance) will return articles with the words credit and finance, ignoring the parentheses, unless an article with exact title Credit (finance) exists.

Search engine features

There are numerous features available, as described below. It might be helpful to run examples in a separate window, while reading features below.

Syntax

The following features can be used to refine searches. Many examples have links as a {{search link}}. (Search link is not guaranteed to exactly emulate the search box.)

  • Phrases in double quotes – A phrase can be matched by enclosing it in double quotes, "like this". Double quotes can define a single search term that contains spaces. For example, "holly dolly" where the space is quoted as a character, differs much from holly dolly where the space is interpreted as a logical AND.
  • Boolean search – the search engine supports the "-" character for "logical not", the AND, the OR, and the grouping parentheses brackets: (_). Logical OR must be spelled in capital letters; the AND operator is assumed for all terms (separated by spaces), but capital AND is equivalent. Parentheses are a necessary feature because:  (blue OR red) AND green, differs from: blue OR (red AND green).
  • Exclusion – Terms can be excluded by prefixing a hyphen or dash (-), which is "logical not". For example likeness -like, or example: payment card -"credit card" finds all articles with 'payment' and 'card', but not "credit card" yet would include 'credit' separately.
  • Wildcard search – The two wildcard characters are * and \?, and both can come in the middle or end of a word. The escaped question mark stands for one character and the star stands for any number of characters. Because many users ask questions when searching, question marks are ignored by default, and the escaped question mark (\?) must be used for a wildcard.
  • Search fuzzily – Spelling relaxation occurs by suffixing a tilde (~) like this~, with results like "thus" and "thins". For example, searching for james~ watt~ would return James Watt, James Wyatt, and James Watts. A mnemonic: <search>~ish.
  • Search results! – Prefixing a tilde ~like this query always gives search results, never jumping to a single title. It functions as the keyboard shortcut to clicking on the "containing" option. For example, ~similiar [sic] finds pages with the misspelling, instead of being redirected by title "Similiar" to page "Similarity". Making tilde the first character disables a redirect. There will be no disambiguation page, no article, no single page as a result. A mnemonic: "wave(~) of <search results>"

Parameters

Stemming

Searching within a page

The internal search engine cannot locate occurrences of a string within the page you are viewing but browsers can usually do this with Ctrl+F, or ⌘ Command+F on a Mac.

See also