Skip to Main Content
Elmer E. Rasmuson Library
view all hours

Instruction: Boolean Searching

Boolean Searching

Boolean logic is a system of showing relationships between sets by using the operators AND, OR, and NOT.

The term Boolean comes from the name of the man who invented this system, George Boole.

Boolean operators will help you broaden and narrow your searches when when searching library catalogs, databases, and the web.

 

 

AND, OR, and NOT

  • The Boolean operator AND is used to search for different concepts. AND narrows a search. 
  • The Boolean operator OR is used to search for synonyms and related terms. OR broadens a search. 
  • The Boolean operator NOT is used to exclude results that contain a specific word.

A good way to illustrate how boolean logic works is through a Venn diagram. The circles in a Venn diagram illustrate different sets and the shaded areas show how the boolean terms form relationships between the sets.

Below are examples of Boolean operators and their associated Venn diagrams.

Boolean AND

mushing AND racing

Boolean AND Venn diagram

 The blue area represents search results that contain information about mushing AND racing.

  The white part of the circles represent items that have information about mushing but not racing, or racing but not mushing.

 Only the items in the blue area will be retrieved.

The Boolean operator AND narrows a search.

Use AND when you are searching for different main concepts.

Boolean OR

caribou OR reindeer

Boolean OR Venn diagram

  The blue area represents search results that contain information about caribou OR reindeer.

  The Boolean operator OR broadens a search.

  Use OR to search for synonyms/related terms.

Boolean NOT

fisheries NOT Alaska

Boolean NOT operator

 The blue area represents search results that contain information about fisheries, but NOT Alaska.

  The Boolean operator NOT eliminates all results containing a specific word, so be very careful using the NOT Boolean operator.

Improving Search Results with Boolean Operators

Finding the right number of search results can be tricky.

Sometimes search tools bring up thousands of hits, when all that is needed is one. Sometimes only a couple of results emerge from a search when you need as many as possible. Sometimes you want just enough sources for a good two, ten or 20 page paper-- but how many is that?

It depends on the context and on the quality or relevance of the search results. Chances are you will only use a fraction of the results that emerge from a single search.

Boolean operators can help you manage the number of search results retrieved. 

Narrow a Search with AND

Search for different concepts using AND
 

Searching for the term mushing by itself may bring up relevant hits, but it may retrieve too many hits.

Narrow your search by adding another concept.

For example, if you're looking for information about racing and mushing (as opposed to recreational mushing), try the Boolean search:

This search forces the search engine to find information containing both terms, not just one term.


Let's take a look at this in Google. Search for the term mushing, which brings up approximately 12,800,000 results.

Screenshot of searching for the term mushing in Google

Narrow the search by adding the concept of racing using the AND Boolean operator. 

Screenshot of Google search for mushing AND racing

 Tip            Unlike library databases, Google automatically ANDs terms.
In Google you don't need to type the word AND, but we did for demonstrative purposes.
 

 The second search results in fewer hits because AND narrows a search.

Broaden a Search with OR

Search for synonyms/related terms using OR
 

Searching for the term caribou by itself may bring up relevant hits, but it may not retrieve articles that use the term reindeer instead of caribou.

Broaden your search by using OR to search for synonyms and related terms.

For example, if you're looking for information about caribou, be sure to include the synonymous term reindeer.

 This search tells the search engine to find information containing either term.


Let's take a look at this in Google. Search for the term caribou, which brings up approximately 62,700,000 results.

Screenshot of Google search for the term caribou

Broaden the search by using OR to search for reindeer, a synonymous term for caribou.

Screenshot of Google search for the terms caribou OR reindeer

 The second search results in more hits. This is because OR broadens a search.

Create a Complex Search Using AND and OR

Sometimes you'll need to create a complex search that uses AND as well as OR.

For example:

Screenshot of Google search for the terms (caribou OR reindeer) AND Alaska

Tip             When writing complex Boolean search strings in Google, OR terms must be grouped in parentheses.

 

Be Very Careful When Using NOT

The NOT Boolean operator is used to eliminate items containing specific words. 

For example, let's say you're searching for information about immigration reform in America. Your search string looks like:

"immigration reform" AND America

You keep getting results having to do with Latin America. 

In this case you can cautiously include the NOT Boolean operator in your search.

When using library databases, use the term NOT. When using Google, use a minus sign.
This is what the search would look like in Google:

A Word of Caution

Different library catalogs and databases handle boolean expressions differently!

  • Some databases support nesting (using long search strings with multiple boolean terms and parentheses), some do not.
  • Some databases will always read a search string left to right.
  • Some databases will always read Boolean terms in one particular order.
  • Some databases support special symbols such as: & for AND, + for OR , - for NOT.
  • Some databases use different rules for basic and advanced searches.

 Read database help information to clarify how to best write your search statement.

 Taking a few moments to read through the "how to search" instructions may save you hours of time and frustration.

Elmer E. Rasmuson Library
1732 Tanana Loop
PO Box 756800
Fairbanks, Alaska 99775-6800
Phone: 907-474-7481​​
Text: 907-341-4404​
AskRasmusonLibrary@uaf.libanswers.com

The University of Alaska Fairbanks is an Affirmative Action/Equal Opportunity employer and educational institution and provider and prohibits illegal discrimination against any individual.

Learn more about UA's notice of nondiscrimination.