This page provides some help on doing searches using the advanced query mechanism. If you have never used this type of search before, 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.
The following table summarizes all the operations that the advanced query 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" |
Non-Alphabetical Characters: The advanced query 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,
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."
To retrieve documents containing a single, specific word, just type the word by itself:
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.
To retrieve documents containing each and every word of a set, type:
(The AND keyword must be all uppercase.) Or, type the words separated by ampersands:
or, the above may be abbreviated to:
As stated earlier, the AND ( & ) operation does not take priority over the OR ( | ) operation; priority is strictly left to right, unless you use parentheses.
To retrieve documents containing at least one of a set of words:
(The OR keyword must be all uppercase.) Or,
As stated earlier, the AND ( & ) operation does not take priority over the OR ( | ) operation; priority is strictly left to right, unless you use parentheses.
To retrieve documents with words within 10 words of each other:
or,
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.
Each proximity is evaluated between two adjacent words. Therefore,
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.
The negation operator reverses the meaning of the subsequent query. Therefore, to select documents that have none of a set of words, use:
Or, using parentheses,
The keyword NOT (note capitalization) also means negation. To retrieve documents containing one word but not another, you can type:
? 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:
These patterns use the standard "globbing" characters as is common for matching filenames (i.e. the familiar "*.*" format).
All evaluation 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:
To retrieve documents with a specific 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: