Using AND, OR, and NOT (Boolean Operators)
|
The examples on this page illustrate the use of the Boolean operators OR, AND, and NOT
(or AND NOT) in indexes, databases, and search engines that support Boolean type searches. |
|
This page discusses four basic search techniques:
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 an index to periodicals, such as RILM Abstracts of Music Literature.
|
Venn diagrams use circles to visually represent Boolean search results. On this page, each large circle represents a group, or set, of article "records" in the music periodical index that contain one search term. Each dot represents a single record in our hypothetical search.
Black dots = records that contain the word jazz White dots = records that contain the word blues Black/White dots = records that contain both jazz and blues
Keyword search for: Jazz OR blues
This search locates articles that are 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 ----> |
||||
Keyword search for: jazz AND blues
This search locates articles 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 |
|||
"Implied AND"
Some databases and search engines assume Boolean "AND" between adjacent words in a keyword search. Implied AND means that a search for body piercing will retrieve body AND piercing not the phrase body piercing. (Be aware that many Web search engines have an implied OR rather than AND!).
Keyword search for: jazz NOT 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 an article 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 |
|||
When to use NOT and when not to use NOT!
NOT is appropriate when a word is used in different contexts. For example, the search vikings not minnesota retrieves records about Vikings but not the Minnesota Vikings. If you are studying Medieval Viking sagas, this is good. If you are researching pro football, it's not.

In our 


University of Nevada, Reno