Ramsey
Library Research GuidesHow do I use Boolean Operators?The examples on this page illustrate the use of the Boolean operators OR,
AND, and NOT in Keyword searches. You
cannot use Boolean operators in other types of searches.
This FAQ has four parts:
I. Simple searches with one Boolean operatorImagine that you need to find several books about jazz or blues music for a class assignment. To get an overview of what is available before focusing on some aspect of jazz or blues music, you perform three Keyword searches in the library catalog:
|
|
This search locates books that may be about either jazz or blues, or that compare both forms of music.
|
Count the records (dots) retrieved by this search: |
||
| jazz set | 21 | ||
| blues set | 20 | ||
| jazz or blues set |
32 |
||
| Every record in the jazz or blues set contains at least one of the search terms jazz or blues. 9 records that contain both terms appear where the sets overlap. | |||
jazz |
blues | These search results demonstrate that you should use OR if you want to retrieve either this term or that term. (Of course, you can OR more than two terms together.) OR always broadens a search. | ||
<---- jazz or blues ----> |
||||
This search locates books that discuss or compare both jazz and blues.
|
Count the records (dots) retrieved by this search: |
||
| jazz set | 21 | ||
| blues set | 20 | ||
| jazz and blues set |
9 |
||
| The result of this search is jazz and blues, the intersection of the jazz set and the blues set. Every record must contain both jazz and blues. | |||
jazz |
| |
blues | Use AND when you want to combine search terms. AND always narrows a search. | |
jazz and blues |
||||
|
This search excludes records that contain the term blues.
|
Count the records (dots) retrieved by this search: |
||
| jazz set | 21 | ||
| blues set | 20 | ||
| jazz not blues set |
12 |
||
| The part of the jazz set that does not contain records in the blues set is retrieved as the jazz not blues set. | |||
jazz |
| |
blues | This last search eliminates all records that contain the term blues. If a book compares jazz with blues, you might lose it from your search. Therefore, use NOT with restraint and be aware of the consequences. | |
jazz NOT blues |
||||
|
II. Using parentheses in searches with more than one Boolean operatorSometimes a focused search must combine several related words for one idea with another word or words, as in the search: (logging or clearcutting) and rainforests. In this search, we used Boolean OR to combine the related words: logging OR clearcutting. Then we used Boolean AND to combine these words with rainforests. The parentheses ensure that results are what we expect.
|
| lacrosse or soccer and history | Retrieves 50+ items Combines soccer and history Retrieves all books about lacrosse This is not what you wanted! |
| (lacrosse or soccer) and history | Retrieves 25+ items Combines lacrosse or soccer "ANDs" those results with history This is exactly what you wanted! |
Of course, you can use more than one OR in a search, as in: (tobacco or smoking) and (cancer or health)
If you want to search for part of a word or a whole word that may have several endings, use an asterisk (*) as a "wildcard." It will improve search results and save you time. For example:
To Find: Use: university or universities
universit* legislate, legislates, legislator, legislators, legislation, or legislating legislat*
How should you use Boolean NOT? Very Carefully!
NOT eliminates all records that contain the term preceded by NOT, but it is a useful tool when a search word has several unrelated meanings. You also can use NOT to exclude some commonly discussed aspect of a subject.
For example, if you are doing a term paper on banks or banking in North Carolina, and you keep getting titles about the Outer Banks of North Carolina, you could tighten up your search by using NOT:
(North Carolina and bank*) not outer
If you are researching salamanders but do not want to look at anything about newts, you could do this:
salamanders not newts
However, you should be aware that any book with chapters about both salamanders and newts will be eliminated from your search results. So, NOT is a very risky operator to use in this search!
NOT is expressed differently in some databases (including the Library Catalog)While NOT is the standard operator for excluding a term in a Boolean search query, some search engines just have to be different.
|
Return to top
Back to Library Research Learning Modules
Last updated by Bryan Sinclair, Public Services Librarian. 20 August 2002.