When composing a query, we need to keep in mind a few simple rules:
Words separated by spaces or ordinary punctuation (which is not listed as a special character in the tables later in this section) are treated as a phrase. The search will only return documents that contain this phrase. However, words within the phrase which are listed in the noise list (such as a, as, and, but, for, etc.) are ignored completely. Matching is also case-insensitive. So searching for the
State;
and
the
will also match County
the
state
of
a
.county
To search for a phrase that contains quotation marks, or one of the special characters such as an exclamation mark, we have to enclose the whole phrase in quotation marks, and then place double quotation marks where we want a quotation mark to appear. For example, "he
yelled
""Hello!""
from
across
the
. To search for several individual words in a document, we separate the words with a comma. The result will be documents that contain all, or only some, of the words listed. The more that match, however, the better the ranking of the result.street"
Other than that, we can use the normal wildcard and Boolean operators. An asterisk matches any number of characters, and a question mark matches any single character. There's also the option of a fuzzy search. Adding two asterisks to the end of a word will match 'stem words' with the same meaning. A search for
, for instance, will include catching and caught.catch**
To combine words in the search string, we use Boolean operators like this:
Boolean Keywords | Shorthand | Meaning |
Apples AND Pears |
|
Both must exist in the document. |
Apples OR Pears |
|
Either must exist in the document. |
Apples AND NOT Pears |
|
The first word must exist in the document, but the second must not. |
Apples NEAR Pears |
|
Both must exist in the document, and be within 50 words of each other. The closer they are, the higher the ranking in the search result. |
NOT @size < 2049 |
|
Document must be larger than 2 KB. |