Help:Searching

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

Contents

Search facilities in Wikibooks

This page explains how to search Wikibooks and how to search a single book. The search tool appears on every page.

Search field

To view a page, just enter its name in the search field and click "Go" or press the [Enter] key, while the search field is active. While this is obvious when using Internet Explorer (tested on version 6), Mozilla (version 1.6 at least) provides no such indication. The Go button is more complex than it looks. It works as follows (each time, only continuing if there is no match):

  1. Check existence of the page exactly as it is entered, e.g. Test Page and Test page are different pages (but most projects have case-insensitivity of the first character of the whole page name, and in the case of a namespace prefix, of the first character after that).
  2. Try all lower case (with the first letter capitalized), e.g. if you type "TEST PAGE", Test page and not Test Page would be displayed.
  3. Try the version with all words capitalized.
  4. Try the all upper case version.
  5. Try a case insensitive title search that also matches partial page titles. If there are several matches, priority is as follows: 1) main namespace, 2) talk pages for main namespace, 3) user pages, 4) user talk pages, 5) {project name}* pages, 6) {project name} talk pages, 7) image pages, 8) image talk pages. That is, for example, if both a talk page with the title and a normal page exist, the normal page is viewed.
    • Stopwords are ignored in this title search.
    • Prefixes like "User:" and "Wikibooks:" are currently treated as words in the title search, but not in the previous matching routines, where they are treated as proper namespace prefixes.
  6. Carry out a full text search as if you clicked the "Search" button; see Help:Searching.

If you use the Go button wisely, it will allow you to quickly jump to your most frequently used pages. It is also a good idea to use it for unambiguous searches -- if a direct match fails, it will always fall back to the normal search anyway, and if it succeeds, you are immediately taken where you want to go. In general, the go button generates little server load, and therefore usually remains functional even if the fulltext search is deactivated for performance reasons.

Special features

A special feature is that applying Go on an IP number gives the User contributions of that IP.

Depending on the contents of MediaWiki:Nogomatch there may be a link to the edit page of the non-existent page, see e.g. w:MediaWiki:Nogomatch. A useful side-effect is that this allows going conveniently to a page on another wiki, by adding the interwiki prefix, albeit that the text "create a module with this title" would not be accurate for the link, in the case of an existing page. Also the CSS-class of the link is "new", not "ex4tiw".

*This is a parameter you set while configuring MediaWiki.

Tips

Avoid short and common words

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.

Search is case-insensitive

The searches for "fortran", "Fortran" and "FORTRAN" all return the same results.

Words with special characters

In a search for a word with a diaeresis, such as Sint Odiliënberg, it depends whether this ë is stored as one character or as "ë". In the first case one can simply search for Odilienberg (or Odilië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.

Phrase

There is no method for searching for a phrase. Contrary to what you might expect, enclosing phrases in double quotation marks such as "can of tuna" will retrieve all pages containing "of" "tuna" and "can".

Searching limitations and Gotchas

No regular expressions or wildcards

You cannot use regular expressions or wildcards such as ? or *. If you don't know what that is, don't worry about it. To search for pages with the words "boat" or "boats" search like this: "boat or boats".

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

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 namespaces selected in the 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.

The URL is

http://en.wikibooks.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&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.

http://en.wikibooks.org/wiki/Special:Search?ns10=1&ns11=1&fulltext=Search&search=test

searches the Template and Template talk namespaces for "test", and

http://en.wikibooks.org/wiki/Special:Search?ns6=1&fulltext=Search&search=jpg

searches the image description pages for "jpg".

To search the Help pages use http://en.wikibooks.org/wiki/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.

The number of search results reported seems to be the total for all namespaces; accordingly there are links to supposed other pages with results; correctly a lower number of results is actually presented.

(Also there is a special search feature Special:Imagelist, which searches in titles, regardless of whether there is an image description.)

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 markup is searched

The MediaWiki markup (what one sees in the edit box), or wikitext, is searched. This distinction is relevant for piped links, for interlanguage links, special characters (if ê is coded as ê 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 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.

Search engines

Google

http://www.google.com/search?q=site%3Aen.wikibooks.org+%22interwiki+link%22 searches for the phrase interwiki link in the English Wikibooks.

%3A is a colon (:), %22 a double quotation mark ("), and + is equivalent to a space ( ); %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%3Aen.wikibooks.org+%22interwiki_link%22

finds pages containing the term interwiki_link.

Examples

Working:

http://www.google.com/search?q=%22michael+jackson%22

http://www.google.com/search?q=%22michael%20jackson%22

Searching for first term only:

http://www.google.com/search?q=michael%20-jackson

Searching for two terms, not the phrase:

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 Wikibooks images with thumbnails in Google cache: png jpg gif

Each thumbnail links to an image result page, which links both to the Wikibooks image page and to the image itself on Wikimedia.

The Go button appears on all MediaWiki pages in the standard skin, next to the search button. The function of the go button is to display a page directly, instead of first having to select it from the search result page. In other words, it allows you to quickly navigate from page to page without following links.