University at Albany Libraries

Boolean Searching on the Internet


[A Primer in Boolean Logic] [Boolean Searching on the Internet]

A Primer in Boolean Logic

The Internet is a vast computer database. As such, its contents must be searched according to the rules of computer database searching. Much database searching is based on the principles of Boolean logic. Boolean logic refers to the logical relationship among search terms, and is named for the British mathematician George Boole.

Boolean logic consists of three logical operators:

Each operator can be visually described by using Venn diagrams, as shown below.


OR
Venn diagram for OR
college OR university
 
Query:    I would like information about college.

 

OR logic is most commonly used to search for synonymous terms or concepts.

 The more terms or concepts we combine in a search with OR logic, the more records we will retrieve.

 

Venn diagram for OR

AND
Venn diagram for AND
poverty AND crime
 
Query:    I'm interested in the relationship between poverty and crime.

 

The more terms or concepts we combine in a search with AND logic, the less records we will retrieve.

 

Venn diagram for AND
A few Internet search engines make use of the proximity operator NEAR. A proximity operator determines the closeness of terms within a source document. NEAR is a restrictive AND. The closeness of the search terms is determined by the particular search engine. For example:
NOT
Venn diagram for NOT
cats NOT dogs
 
Query:    I want to see information about cats, but I want to avoid seeing anything about dogs.

 

NOT logic excludes records from your search results. Be careful when you use NOT: the term you do want may be present in an important way in documents that also contain the word you wish to avoid.


Boolean Searching on the Internet

When you use an Internet search engine, the use of Boolean logic may be manifested in three distinct ways:
  1. Full Boolean logic with the use of the logical operators
  2. Implied Boolean logic with keyword searching
  3. Predetermined language in a user fill-in template
1. Full Boolean logic with the use of the logical operators

Many search engines offer the option to do full Boolean searching requiring the use of the Boolean logical operators.

Examples:

  Query:    I need information about cats.

 

Boolean logic:    OR

 Search:    cats OR felines

 

Query:    I'm interested in dyslexia in adults.

 

Boolean logic:    AND

 Search:    dyslexia AND adults

 

Query:    I'm interested in radiation, but not nuclear radiation.

 

Boolean logic:    NOT

 Search:    radiation NOT nuclear

Query:    I want to learn about cat behavior.

 

Boolean logic:    OR, ANDSearch:    (cats OR felines) AND behavior

 Note: Use of parentheses in this search is known as forcing the order of processing. In this case, we surround the OR words with parentheses so that the search engine will first process this part of the search. Next, the search engine with combine this result with the last part of the search. Using this method, we are assured that the OR terms are kept together as a logical unit.

 

2. Implied Boolean logic with keyword searching

Keyword searching refers to a search type in which you enter terms representing the concepts you wish to retrieve. Boolean operators are not used.

 Implied Boolean logic refers to a search in which symbols are used to represent Boolean logical operators. In this type of search on the Internet, the absence of a symbol is also significant, as the space between keywords defaults to either OR logic or AND logic. Most well-known search engines, with the exception of Lycos and Northern Light, default to OR.

 Examples:

  Query:    I need information about cats.

 

Boolean logic:    OR

 Search:    cats    felines

 

Query:    I'm interested in dyslexia in adults.

 

Boolean logic:    AND

 Search:    +dyslexia    +adults

 

Query:    I'm interested in radiation, but not nuclear radiation.

 

Boolean logic:    NOT

 Search:    radiation    -nuclear

Query:    I want to learn about cat behavior.

 

Boolean logic:    OR, ANDSearch:    cats    felines    +behavior

 

3. Predetermined language in a user fill-in template

Some search engines offer a search template which allows the user to choose the Boolean operator from a menu. Often the logical operator is expressed with substitute language rather than with the operator itself.

  Query:    I need information about cats

 

Boolean logic:    OR

 Search:    Any of these words/Can contain the words/Should contain the words

 

Query:    I'm interested in dyslexia in adults.

 

Boolean logic:    AND

 Search:    All of these words/Must contain the words

 

Query:    I'm interested in radiation, but not nuclear radiation.

 

Boolean logic:    NOT

 Search:    Must not contain the words/Should not contain the words

 

Query:    I want to learn about cat behavior.

 

Boolean logic:    OR, AND

 Search:    Combine options as above if the template allows multiple search statements

 

 

Quick Comparison Chart:
Full Boolean vs. Implied Boolean vs. Templates

Full Boolean Implied Boolean Template Terminology
OR college or university college    university 
*see note below
any of these words
can contain the words
should contain the words
AND poverty and crime +poverty    +crime  all of these words
must contain the words
NOT cats not dogs cats    -dogs must not contain the words
should not contain the words
NEAR, etc. cats near dogs N/A near
 * This search statement will resolve to AND logic at Lycos and Northern Light because the implied Boolean logic at these engines defaults to AND. 

Where to Search

Feature Search Engine
Boolean operators  AltaVista (Advanced Search)
Cyber411
Dogpile
Excite
HotBot
HotBot SuperSearch
NetFind
Northern Light
WebCrawler
Implied Boolean +/- AltaVista
Excite
HotBot
HotBot SuperSearch
Infoseek
Lycos
Lycos Pro
Mamma
MetaCrawler
NetFind
Northern Light
PlanetSearch
Boolean logic
by template terminology
Excite (Power Search)
HotBot
HotBot SuperSearch
HuskySearch
Infoseek Advanced Search
Lycos Pro
SavvySearch 
Proximity operators  AltaVista (Advanced Search)
Cyber411
Dogpile
Lycos Pro
WebCrawler
 

Laura Cohen | June 1998
lcohen@cnsvax.albany.edu