"Knowledge is of two kinds. We know a subject ourselves,
or we know where we can find information upon it."
--Samuel Johnson, 1744
Boolean logic takes its name from British mathematician George
Boole (1815-1864), who wrote about a system of logic designed to
produce better search results by formulating precise queries.
He called it the "calculus of thought." From his writings, we
have derived Boolean logic and its operators: AND, OR, and NOT,
which we use to link words and phrases for more precise queries.
The Boolean AND actually narrows your search by retrieving only documents
that contain every one of the keywords you enter. The more terms you
enter, the narrower your search becomes.
EXAMPLE: truth AND justice
EXAMPLE: truth AND justice AND ethics AND
The Boolean OR expands your search by returning documents in
which either or both keywords appear. Since the OR operator
is usually used for keywords that are similar or synonymous, the
more keywords you enter, the more documents you will retrieve.
EXAMPLE: college OR university
EXAMPLE: college OR university OR institution OR
The Boolean NOT or AND NOT (sometimes typed as ANDNOT) limits your search by returning only
your first keyword but not the second, even if the first word
appears in that document, too.
EXAMPLE: pepsi AND
Nesting, i.e., using parentheses, is an effective way to combine
several search statements into one search statement. Use
parentheses to separate keywords when you are using more than one
operator and three or more keywords.
EXAMPLE: (hybrid OR electric) AND (Toyota OR
(For best results, always enclose OR statements in parentheses.)
Boolean logic is not always simple or easy. Different
search engines handle Boolean operators differently. For example,
some accept NOT, while one accepts ANDNOT as one word, others AND NOT as two words.
Some require the
operators to be typed in capital letters while others do not.
Some search engines use drop-down menu options to spell out the
Boolean logic in short phrases. For example, "All of the words"
or "Must contain" equates to AND;
"Any of the words" or "Should contain" equates to OR;
and "Must not contain" equates to NOT.
Implied Boolean operators use the plus (+) and minus (-) symbols
in place of the full Boolean operators, AND and NOT. Typing a
(+) or (-) sign in front of a word will force the inclusion or exclusion
of that word in the search statement.
Similarly, putting double quotation marks (" ") around two or more
words will force them to be searched as a phrase in that exact
EXAMPLE: "green tea"
While full Boolean operators are usually accepted only in the
advanced search option of search engines, implied Boolean operators
are accepted in the basic search options of most search engines.
Proximity, or positional, operators (NEAR, ADJ, SAME, FBY) are not
really part of Boolean logic, but they serve a similar function
in formulating search statements.
Not all search engines accept proximity operators, but a few
accept NEAR in their advanced search option. The NEAR operator
allows you to search for terms situated within a specified
distance of each other in any order.
The closer they are, the higher the
document appears in the results list.
Using NEAR, when possible, in place
of the Boolean AND usually returns more relevant results.
EXAMPLE: phylogeny NEAR ontogeny
EXAMPLE: de Vere NEAR Shakespeare
Even fewer search engines accept ADJ (adjacent to). ADJ works
as a phrase except that the two terms, which must appear adjacent
to each other in the webpage, can appear in any order.
EXAMPLE: Ernest ADJ Hemingway
EXAMPLE: endangered ADJ species
returns both Ernest Hemingway and Hemingway Ernest; endangered species and species endangered.
Other proximity operators, such as SAME (keywords found in the same
field) and FBY (followed by), are used as advanced searching
techniques in library and other
specialized databases that contain bibliographic citations or
references to journal articles, but are not yet employed by search
Choose one of the EXAMPLES from above and try it as a search on
Google's advanced search page.
NOTE: On some other search engines, you may have to select "Exact phrase,"
"Any of the words," "Must contain," etc. You may also have
to indicate if it's a Boolean search.
[Table of Contents]
[Gateways & Databases]
[Evaluating Web Pages]
Last updated by E. Chamberlain,Thursday September 07, 2006