Ferret Help


This page provides some help on doing searches using Ferret. If you are new to Ferret, you may want to skip the summary (the table below), and read the section called "Details & Long Examples" first, and then use the Summary section as a reference table.

Summary

The following table summarizes all the operations that Ferret can perform. The "Quick Example" column shows how the operation is to be entered. Clicking on the operation heading will jump to a more detailed explanation of the operation. Please read the few notes that follow the table; they are important.

Operation Quick Example(s)
Operation Quick Example(s)
Single Word word Negation NOT word
! word
Required Words (and) word AND werd AND wird
word & werd & wird
word werd wird
Wild Characters w?rd
w*
w[oei]rd
Optional Words (or) word OR werd OR wird
word | werd | wird
Priority (Parentheses) word AND (werd OR wird)
word & (werd | wird)
Proximity word NEAR werd
word 10 werd
Phrase "werd is the word"

Notes:

Non-Alphabetical Characters: Ferret operates only on alphabetical characters. You cannot perform searches for numbers. All characters other than alphabetical (numbers, symbols, punctuation) are ignored by the actual search engine; they are treated the same as spaces. However, when searching for phrases, including them can be useful because the search results will be displayed properly.

Case Sensetivity: if a word is typed in all lowercase letters, the search on it is case-insensetive. If there is at least one capital letter, the search is case-sensetive. The exception to this rule are the special keywords, described next.

Special Keywords: The words AND, OR, NOT, and NEAR (all capital letters) are special keywords. AND has the same meaning as the & operator; OR has the same meaining as the | operator; NOT has the same meaning as the ! operator; and NEAR has the same meaning as a proximity-number of 10.

Order of Operations: All operations take place left to right; certain operators do not take priority over others. Therefore,

    first OR second AND third

will select documents containing "third," and one of the words "first" or "second." It does not select documents containing either "first" or both the words "second" and "third."


Details & Long Examples

Single Word Search

To retrieve documents containing a single, specific word, just type the word by itself:

    word

The word must not contain punctuation, numbers, or other special characters. Please see the note on non-alphabetic characters in the previous section.

As stated earlier, if the word is all lowercase, then the search is not case-sensetive. If there is at least one capital in the word, then the search is case sensetive.

Multi-Word Search

Required Word Set (AND Operation)

To retrieve documents containing each and every word of a set, type:

    first AND second AND third

(The AND keyword must be all uppercase.) Or, type the words separated by ampersands:

    first & second & third

or, the above may be abbreviated to:

    first second third

As stated earlier, the AND ( & ) operation does not take priority over the OR ( | ) operation; priority is strictly left to right, unless you use parentheses.

Optional Word Set (OR Operation)

To retrieve documents containing at least one of a set of words:

    first OR second OR third

(The OR keyword must be all uppercase.) Or,

    first | second | third

As stated earlier, the AND ( & ) operation does not take priority over the OR ( | ) operation; priority is strictly left to right, unless you use parentheses.

Proximity

To retrieve documents with words within 10 words of each other:

    first 10 second

or,

    10 first second

The NEAR keyword is an abbreviation for a proximity number of 10. Therefore, the following means the same thing as the two queries above. Note that NEAR must be typed all uppercase.

    first NEAR second

Each proximity is evaluated between two adjacent words. Therefore,

    12 first second third fourth

finds documents containing "second" within 12 words of "first," and "third" within 12 words of "second," and "fourth" within 12 words of "third." It does not find documents with all four words within 12 words of each other.

A proximity number will remain in effect (left to right) until another number is specified. A number of "0" will cancel proximity checking. Note that proximity searches can be turned off when the index is generated and so may not be available on all sites.

Negation

The negation operator reverses the meaning of the subsequent query. Therefore, to select documents that have none of a set of words, use:

    !notthis & !northis & !northiseither

Or, using parentheses,

    !(notthis | northis | northiseither)

The keyword NOT (note capitalization) also means negation. To retrieve documents containing one word but not another, you can type:

    required AND NOT disallowed

Wild Characters

? matches any single letter.
* matches any zero or more letter.
[abc] matches a single letter consisting of either an 'a', 'b', or a 'c.'

To retrieve documents containing a piece of a word:

    onechar? | manychars* | rangechars[aeiou]

These patterns use the standard "globbing" characters as is common for matching filenames (i.e. the familiar "*.*" format).

Prioritization

All evaluation by ferret occurs left to right, regardless of the operation (see note). To prioritize sections of a query, parentheses are required.

For example, to retrieve documents containing some required words and at least one of several optional words:

    firstreqd & secordreqd & (firstoptl | secondoptl)

Phrase Search

To retrieve documents with a specific phrase:

    "this is my phrase"

This will search for documents containing the specified words in sequence, ignoring punctuation and numbers (see note). Thus, the above example is equivalent to specifying a proximity-number of 1, as follows:

    1 this is my phrase

Ferret engine by Verisim