Skip to Main Content
Go to Penn Libraries homepage   Go to Guides homepage

Using the Library Catalog

Boolean Operators

How Boolean searching works

Boolean operators are commands issued to the catalog to denote the custom retrieval of a subset of two or more concepts. In a famous example illustrating Booleans:

  • Searching for honey OR badger will retrieve results with just the word honey, will also retrieve results with just the word badger, and will also retrieve results with both terms, like "honey badger." OR expands your results to include both concepts, including the overlap.
  • Searching for honey AND badger will only include results with both terms in the record, including the phrase "honey badger." AND narrows your results into only the overlap between your two concepts.
  • Searching for honey NOT badger will only include results that have the word honey as long as badger is not included. It will include results with honey alone. NOT carves exclusions out of one of the concepts.

 

Three venn diagrams, each with two overlapping circles labeled A and B respectively. In the first venn diagram, labeled A OR B, all content is shaded. In the second diagram, labeled A AND B, only the overlapping portion of circles is shaded. in the third diagram, labeled A NOT B, the A circle is shaded, minus the portion of that circle which overlaps with the B circle.

Booleans must be capitalized

When used with capitalization, the Boolean operators (AND, OR, NOT) are operational in all keyword searches. Note the exception: when Booleans are enclosed within quoted phrases (" "), they will no longer operate as Booleans.

The default operator is AND

If two or more words are entered without any Boolean operators, they will be searched as if connected with AND.

Using and, or, not as regular words

If the words andornot are in a search phrase, but you do not wish to use the words as Boolean operators, put the phrase in quotes.

"nickel and dime"
"dazed and confused"

Enclosing a phrase in quotation marks nullifies any use of words as Boolean operators, even if they are capitalized.

"ZOO OR LETTERS NOT ABOUT LOVE" as enclosed in quotation marks will retrieve only a few results of this exact phrase.
ZOO OR LETTERS NOT ABOUT LOVE
 
without quotation marks will retrieve over 100,000 results because the terms OR and NOT are being used as Boolean operators.

Combining Booleans using parentheses

Enclose search terms and operators in parentheses to specify the order in which they are to be interpreted. Information within parentheses is interpreted first, then information outside parentheses is interpreted next.

(life OR death) AND philosoph*

If there are nested parentheses, the innermost parenthetical expressions are interpreted first, then the next, until the full search statement has been interpreted.

((song* OR poem*) AND (life OR death)) AND antholog*

Using a dash for NOT

A dash before a word acts as NOT.

cats -dogs

Phrases

Use quotation marks to search words together

Put quotation marks around terms to be searched as a phrase:

    "distance learning"
    
"gold standard"

Consider using quotes for title phrases:

    "lord jim"
    
"call of the wild"

Truncation does not work within quoted phrases

You cannot use a truncation symbol (*) within a quoted phrase to expand results. While this trick works in some databases, it does not work in our catalog.

"honey badger*" will not also retrieve "honey badgers"

Proximity

Proximity searches use the tilde (~) symbol

To do a proximity search, put search terms in quotation marks, followed by the tilde "~" symbol and a number.

    "happy camper"~3 finds happy and camper within 3 words of each other.
    "online learning"~5 finds online and learning within 5 words of each other.

Penn Libraries Home Search the Catalog
(215) 898-7555