Library and Archives Canada
Symbol of the Government of Canada

Institutional links

ARCHIVED - The Learning Centre

Archived Content

This archived Web page remains online for reference, research or recordkeeping purposes. This page will not be altered or updated. Web pages that are archived on the Internet are not subject to the Government of Canada Web Standards. As per the Communications Policy of the Government of Canada, you can request alternate formats of this page on the Contact Us page.

Toolkit

Internet Research Skills

Basic Web Searching: A Guide

Boolean Operators

Boolean searching is British mathematician George Boole's contribution to information retrieval. It has traditionally been used on databases, though it can also be used on many search engines. Boolean searching is a set of rules and operators that allow you to define exactly how you want your search done.

Boolean searching uses four logical operators:

Venn diagrams show the difference. The search will find results in the shaded area.

Venn diagrams showing the function of Boolean operators OR, AND and NOT

OR

OR tells the search engine to look for either term in all the documents and pages it looks at. It is usually used with synonyms (e.g. women OR lady). The more words you include, the more results you will get. So,

women OR pioneer

will give you any documents or pages that have "women" or "pioneer" somewhere.

AND

AND tells the search engine to look for any documents or pages that have both (or more) words. The more words you use, the fewer results you will get. So,

women AND pioneer

will only give you results that have both "women" and "pioneer" in them. Most search engines also support the use of the plus sign in place of AND:

women +pioneers +travel (see the note below)

NOT

NOT tells the search engine to look for any documents or pages containing the first term or terms, but not the term following the NOT operator. So,

women NOT pioneer

tells the search engine that you want to find documents or pages that contain the word "women", but you don't want anything with the word "pioneer" in it. Most search engines also support the use of the minus sign in place of NOT:

women -pioneers (see the note below)

Important note: Do not leave a space between the word and the + or - sign.

Thus: +women instead of +  women

NEAR

NEAR tells the search engine that the words should be close to each other. Not all search engines support this operator. Those that do set the distance differently. See Search Engines for details. For example,

women NEAR pioneer

will make the search engine look for instances where "women" and "pioneer" are within ten words of each other.

Alternative Boolean Terms

There is a second version of Boolean searching supported by many search engines, sometimes called implied Boolean. Implied Boolean searching uses three logical operators:

  • + (same as Boolean AND)
  • - (same as Boolean NOT)
  • " " (for phrases)

"..."

Quotation marks (" ") put around the expression tells the search engine that you want to match the exact phrase. So,

"women pioneers"

tells the search engine to only look for instances where the words "women pioneers" are next to each other. Some search engines also use parentheses for this function:

(women pioneers)

Wild Cards

Wild cards are one of the most powerful tools you can use in searching. They enable you to search for variations of a word. For example:

explor*

will give you any documents or pages that have "explor" as part of a word -- exploration, explore, exploring, explored, etc. Also,

col*r

will find both colour and color.

Wildcards vary from search engine to search engine, so read your search engine's "Help" or "Advanced" page. The asterisk (*) is the most common convention; % is also used.

Nesting

Nesting, using parentheses, "forces" a search engine to do a search in a certain order. So,

(women OR lady OR female) NOT pioneer

will make the search engine sort through the results of "women OR lady OR female" first, then delete all the ones that have "pioneer."

Combinations

The best way to use Boolean searching is to combine as many logical operators and keywords as possible to try to narrow the search. If this doesn't give enough results, then try reducing the number of keywords used in the search. By playing with the keywords you use, you can refine your searches to give the best results. For example:

(women OR lady OR female) AND pioneer* NOT (west OR western OR prairie)

Forgetting Your Boolean Logical Operator

If you do not use a Boolean operator, most search engines will assume that you meant to use "OR" or "AND" and give you results using one of those operators. Check the Help page of your search engine to find out which is used.

Search Engines

Different search engines work in different ways. Many have templates (forms) that help you with Boolean searching. Others use strict Boolean logic. Most, though, will use something in between.

Nearly all search engines support Boolean operators, with the notable exceptions of Google, LookSmart and Yahoo. For a detailed list of features supported by different search engines, visit Search Engine Watch's Search Features Charts: www.searchenginewatch.com/facts/article.php/2155981. For specific information on a particular search engine's features, look for information on that engine's "Help" or "Advanced" search pages.

To learn more about Boolean searching, visit the University of Albany Libraries' page Boolean Searching on the Internet: http://library.albany.edu/internet/boolean.html or Search Engine Watch's Web Searching Tips: http://searchenginewatch.com/facts.

Note: See also Search Help for tips on searching the Library and Archives Canada site.


Return to Internet Research Skills