![]() |
BARE BONES 101: |
![]() |
"Knowledge is of two kinds. We know a subject ourselves, or we know where we can find information upon it."
--Samuel Johnson, 1744
LESSON 8: SEARCHING WITH BOOLEAN LOGIC AND PROXIMITY OPERATORS
WHAT'S A "BOOLEAN"?
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.
BOOLEAN "AND"
The Boolean AND 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 congressBOOLEAN "OR"
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 campus OR higher education
BOOLEAN "NOT" / "AND NOT"
The Boolean NOT or AND NOT limits your search by returning only your first keyword but not the second, even if the first word appears in that document, too.
EXAMPLE: bulimia AND NOT anorexia
EXAMPLE: cowboys AND NOT dallas
NESTING -- WITH BOOLEAN OPERATORS
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: (scotch OR bourbon) AND NOT (beer OR wine)
(For best results, always enclose OR statements in parentheses.)
BOOLEAN LOGIC REDUX
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
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.
EXAMPLE: +bulimia -anorexiaSimilarly, putting double quotation marks (" ") around two or more words will force them to be searched as a phrase in that exact order.
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 OPERATORS
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 ShakespeareEven 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 engines.
ASSIGNMENT:
Choose one of the EXAMPLES from above and try it as a search on the "advanced" page of the search engine of your choice.HINT: On some 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]
[Search Engines]
[Metasearchers]
[Subject Directories]
[Gateways & Databases]
[Evaluating Web Pages]
[Search Strategies]
[Search Tips]
[Field Searching]
[Troubleshooting]
[All the Web (Fast)]
[Alta Vista]
[Google]
[Ixquick]
[Yahoo!]
[Final Exam]
[Beyond Bones]
[User Agreement]
Links and text checked regularly. Latest update on 10 July 2002.
This tutorial was first created in January 2000 by
Ellen Chamberlain,
library webweaver.
Copyright ©
the Board of Trustees of the University of South Carolina.
URL: http://www.sc.edu/beaufort/library/lesson8.html