facebook pixel Skip to Main Content
Idaho State University home

Boolean Searching in Library Databases and on the Web

What is Boolean Searching?

It is a database search method based on the principles of Boolean logic, originally developed by the British mathematician George Boole in the mid 19th century.

Why use Boolean Searching?

Information databases, including Web search engines, rely on matching terms that capture the idea of an information need (=keywords).   Boolean searching allows you to combine search terms in specific ways for effective matches.

Examples:

dogs and cats
dogs or cats
dogs not puppies
(dogs or cats) and training
(dogs or cats) and (training or obedience)
(dogs or cats) and (training or obedience) not puppies

To understand the Boolean equivalent "+" and "-" used in Web search engines, see below.

 

How does Boolean logic work?

Boolean logic establishes specific relationships among search terms.  You can expand a search concept, combining  terms with OR; you can narrow a focus by requiring that two or more terms must be present using AND. Finally, you can exclude an idea or concept using the operator  NOT.  These Boolean connectors (AND, OR, NOT) and the parentheses determine how the computer performs the search.

Example Queries:

Query 1: I need information about college
OR
 
Boolean OR figure-OR results must contain either of the search terms
Keyword: college
Expand: college OR university
Explanation: You need documents with either term present
  • If you type in "college" alone, only documents containing that word will be retrieved, but clearly, documents containing either of the two words might be relevant.

Query 2:  I need information about financial aid for college
AND
 
Boolean AND-AND results must contain both of the search terms
Keywords: financial aid, college
Narrow focus: financial aid AND college
Explanation: You want only those documents with both terms present
  •  You need both words present, otherwise you might retrieve documents about types of financial aid which are irrelevant to this information need.

  Boolean AND-3 terms connected with AND-results must contain all 3 terms
Narrower focus: financial aid AND college AND application
Explanation: All three terms have to be present
 
Combining Boolean operators:
Financial aid AND (college OR university)
(Financial aid OR scholarships) AND (college OR university) AND application

 

Query 3: I need information about financial aid for college. At this point I really don't want to know anything about scholarships.
Boolean NOT-results would contain first term but NOT the second
 
Keywords: college, financial aid, scholarships
Exclusion:  college AND financial aid NOT scholarships
  •  The operator NOT is helpful if you notice a recurring topic in your retrieval that is not relevant to your information need.  Redo the search using NOT and the keywords to exclude the idea.

Notes:

1) To increase the number of hits retrieved, you might consider using a truncation symbol.  For example if you enter scholarship*, the computer will match both scholarship as well as scholarships.  Truncation can be applied to pick up variations of a word stem: pigment* = pigment, pigmentation, pigments, etc. Truncation symbols vary, depending on the database either * or ? or ! may be used.
pigment(truncation symbol)
*
  -s
-ed
-ation

2)  Some search engines require that compound nouns or phrases (financial aid) be put in quotation marks: "financial aid"

Final Consideration:

Computers can be very effective tools to locate information, but they are only machines. It is important to understand that computer output depends upon human input, and is only as useful as the instructions we provide.  Computerized search mechanisms match terms based on  Boolean logic: the better you understand how it works, the better the results will be.

Boolean Equivalents Boolean implied by Symbols "+" and "-" in Web Search Engines

 

AND
+
Query:  I need information on bears in Yellowstone Park:
                + bears   + yellowstone
NOT
-
Query: I want information about bears in the west but not in Yellowstone Park:         + bears   -  yellowstone
OR
There is not a symbol for OR, but be aware that certain popular search engines assume OR between terms if no symbol is indicated.
                  For example:  AltaVista defaults to OR,
                  Google and Northern Lights default to AND.

Check search engines' help screens to find out what Boolean operators are implied!

Predetermined search Templates in Web Search Engines and Databases

 

Find results:
with all of the words
AND
with any of the words
OR
without the words
NOT
with the exact phrase
ONLY

   

 
Boolean
Implied Boolean
Template Terminology
AND
college and financial aid
+ college + "financial aid"
all of these words
OR
college or university
 college  university
(only some search engines)
any of these words
NOT
dogs not cats
dogs - cats
without the words

 

Web search engines vary in the way they use Boolean logic.  Search engines can use implied Boolean to mean either AND or OR.  Check the search engine help screens to find out what Boolean operators are implied.