Basic Boolean Tutorial

Boolean query is a type of search allowing you to combine keywords or phrases with operators such as AND, NOT and OR to further produce more relevant results. For example, a Boolean query could be "book" AND "Harry Potter". This would limit the search results to only those documents containing both the keyword AND the exact phrase.

Boolean Operators are UPPERCASE

To differentiate search parameters from operators (AND, OR, NOT), the latter should be capitalized.

Boolean Query Operator: AND

Use AND to narrow your search: all of your search terms will present in the retrieved documents.
Example: Phone AND Battery AND Screen AND Apple
A space is an “implied AND,” and you don’t have to type it, as every blank space is interpreted as an AND operator.
Example: Phone Battery Screen Apple

Boolean Query Operator: OR

The OR operator broadens your search results by connecting multiple keywords or phrases. The OR operator is interpreted as “at least one is required, more than one or all can be returned.”
Although it isn't required to encapsulate OR statements with parentheses, if you don’t your search will run but execute in a way that you probably did not intent. As a best practice, you should always use parentheses around OR statements as a matter of good search syntax.
Example: Phone AND Battery AND Screen AND (Apple OR Android OR Blackberry)
The returned results must mention at least one of the following: Apple, Android, Blackberry. However, if a document mention 1 or all 3, it will be returned.

Boolean Query Operator: NOT

Use NOT to exclude term(s) from your search results.
Example: "higher education" NOT "community colleges"

Using Multiple Query Operators

Basic example:

  • (Smartwatch OR "Smart Watch") AND Best
  • (Smartwatch OR "Smart Watch") AND ("Best" OR "Excellent")
  • (Smartwatch OR "Smart Watch") AND ("Best" OR "Excellent") AND NOT (Microsoft OR Blackberry)