Contents
Cal Poly Pomona

Boolean Operators

Boolean operators are a feature of many of the databases available from the Library (including the Library Catalog) and of many of the search engines on the World Wide Web. Boolean Operators will help you make a better search by including more items that are relevant and fewer items  that are irrelevant.  Here we will explain the operators AND, OR and NOT. In the examples below, the shaded parts represent the items that are retrieved.

A

B

AND operator diagram

Apples AND Oranges

The AND operator is used to narrow a search or to make it more specific. In the example on the  left, set A, which is all items that contain the word "apples" is  put in an "and" relationship with set B, which is all items that contain the word "oranges".

The result is a set that contains only those items that  contain both the word  "apples" AND the word  "oranges".

A

B

OR operator diagram

Apples OR Oranges

The OR operator is an inclusive  operator. In the example on the left, set A (apples) is put in an "or" relationship with set B, (oranges). 

The result is a set that which contain A, all  items which contain B, and all items which contain A and B. The OR operator is often used to broaden a search or to complete a concept by including synonyms  or variant terms for the same concept.

A

B

NOT operator diagram

Apples NOT Oranges

The NOT operator is used to narrow a search but it is done by exclusion. In the example on the left, set A (apples) is put in a "not" relationship with set B (oranges). 

The result is a set that includes items with the word "apples", but eliminates those that contain the word "oranges". The NOT operator can eliminate items with useful information, however, because it does not weigh the significance of the occurrence of the word. If the item is primarily about apples and only mentions oranges incidentally, the item will not be retrieved. The NOT operator should be used with caution.

Library Webteam