Skip to main content

PubMed

Using AND, OR, NOT

Boolean logic is a building block of many computer applications and is an important concept in database searching.  Using the correct Boolean operator can make all the difference in a successful search.

AND, OR, NOT

There are three basic Boolean search commands: AND, OR and NOT.

  • AND searches find all of the search terms.  For example, searching on dengue AND malaria AND zika  returns only results that contain all three search terms.  Very limited results.

  • OR searches find one term or the other.  Searching on dengue OR malaria OR zika returns all items that contain any of the three search terms.  Returns a large number of results.
  • NOT eliminates items that contain the specified term.  Searching on malaria NOT zika returns items that are about malaria, but will specifically NOT return items that contain the word zika.  This is a way to fine-tune results. Note:  sometimes AND NOT is used;  serves the same function as NOT.

Using Boolean Search with Exact Phrases

If you're searching for a phrase rather than just a single word, you can group the words together with quotation marks.  Searching on "dengue fever" will return only items with that exact phrase.  

When to use parentheses?

It's a lot like basic math.  (2 × 4) + 1 = 9   but 2 × (4 + 1) = 10

Think of your search in concepts, then put those concepts inside parentheses.  Different databases have different rules about combining searches.  To make sure you get the search you want, use parentheses - every database follows those rules. For example:

dengue OR malaria AND zika  can be interpreted as

  •  (dengue OR malaria) AND zika = articles about dengue or malaria, that also discuss zika.  Every item returned would mention zika, and either dengue or malaria.  As the zika virus has only recently been a serious issue, this would limit the number of results.
  • dengue OR (malaria AND zika) = every article about dengue, or those that discuss both zika and malaria.  Since dengue fever has been a concern for over 250 years, this search would yield different results.  Every item about dengue would be returned, as would those that discuss both of the other two.

Maps and Directions

.