Help:Searching

From Wikisource
Jump to navigation Jump to search
Help:Introduction

Other help: Contents

Internal search engines

[edit]

The search box on every Wikisource page will match by default in the three namespaces for works: the Main space for titles, the Author space for author names and the Portal space for topics. As you type, matches will appear beneath the box—but from titles in the Main space only. In the box above, you can choose from the other common namespaces: Index has the scans of all the pages; Page is for the editing individual source pages; Wikisource is for system information—you can choose exactly which spaces to search in by ticking or unticking the boxes. Searches include both titles and contents within these spaces. You can get a search box such as that above anywhere by clicking on the magnifier next to the search box without any text in the box.

You can type any of these as prefixes into the normal search box to limit the search to one namespace. Thus:

author:Charles
will allow you to choose between Darwin, Dickens etc.

There are also some "pseudo" prefixes which make other restrictions. "Intitle:" limits the search to words in the title, and "prefix:" limits it to titles starting with characters given.

e.g. intitle:man
returns, among other entries, "The Rights of Man", "The Man", a redirection page and "Poems (1898)/Man" (a poem entitled Man in that book). Note that "/" indicates a sub-page, a common occurrence in Wikisource.
intitle:fox prefix:1911 Enc
returns only entries in the 1911 Encyclopædia Britannica which include "fox" in their title. e.g. "…/Fox, Charles James"
fox prefix:1911 Enc
will search the whole encyclopedia for the word "fox". Ordering is important in these queries: all words following the prefix are included.
Caveat: this will only find content if the pages haven't been 'transcluded' into the main page space. This is a known issue.

The "all:" prefix searches in all namespaces. If you are unhappy with the default namespaces that Wikisource uses and you are logged in, you can change them in your own Search preferences.

Wiki searches are for full words, though stemming is used to remove endings. The "wild-card" symbol * can be used at any place. e.g. *land will find many countries. Full boolean searches are also supported. See w:Help:Searching for details.

External search engines

[edit]

Google

[edit]

If you frequently search via Google, consider installing the Google Toolbar. Using the "search this site" button allows you to quickly search the English version of Wikipedia. The official Google Toolbar is available in versions for Firefox and Internet Explorer.

[edit]

Wiki markup allows you to insert links to Google searches by including google: as the prefix for the link. This can sometimes be useful on talk pages. It is done like this:

[[google:shakespeare]].

Which looks like this:

google:shakespeare

Note: It is important not to use spaces in the search. To add more parameters to the search, separate them by a plus sign, +. For a phrase search, use a hyphen (minus sign), -, between each word. E.g. to search for "John Milton", use john-milton .

To provide a link to a Wikisource-specific search, include in the google-link +site:en.wikisource.org (no spaces before or after), like this:

[[google:Shakespeare+site:en.wikisource.org]].

Which looks like this:

google:Shakespeare+site:en.wikisource.org

To clean up the link so that only the part you want to show is presented, use the pipe, like this:

[[google:Shakespeare+site:en.wikisource.org|"Shakespeare"]]

Which makes it look like this:

"Shakespeare"

Custom searches

[edit]

When setting up a large reference work on Wikisource, it is often convenient to have a search box on the front page so that people can search it easily—there may be thousands of separate pages. This is facilitated by the {{engine}} template, which in its default form will search the page it is on and any subpages. It can easily be adapted to search another work. e.g. (try it)

This example is set up by {{engine|Popular Science Monthly|work=Popular Science Monthly}} where the optional parameter after "|" changes the search button and the "work" parameter changes the space that is searched.

Caveat: this will find titles but not content if the pages haven't been 'transcluded' into the main page space. This is a known issue.

If this isn't enough, then you can design your own using the <InputBox> extension provided on Mediawiki.

See also

[edit]