What Is a Boolean Search?

Examples of Boolean operators

A Boolean search, in the context of a search engine, is a type of search where you can use special words or symbols to limit, widen, or define your search.

This is possible through Boolean operators such as AND, OR, NOT, and NEAR, as well as the symbols + (add) and - (subtract).

When you include an operator in a Boolean search, you're either introducing flexibility to get a wider range of results, or you're defining limitations to reduce the number of unrelated results.

Google search engine page with search results displayed on a computer monitor
Oleksiy Maksymenko/Getty Images

Most popular search engines support Boolean operators, but the simple search tool you'll find on a website probably doesn't.

Boolean Meaning

George Boole, an English mathematician from the 19th century, developed an algebraic method that he first described in his 1847 book, The Mathematical Analysis of Logic and expounded upon in his An Investigation of the Laws of Thought (1854).

Boolean algebra is fundamental to modern computing, and all major programming languages include it. It also figures heavily in statistical methods and set theory.

Today's database searches are largely based on Boolean logic, which allows us to specify parameters in detail—for example, combining terms to include while excluding others. Given that the internet is akin to a vast collection of information databases, Boolean concepts apply here as well.

Boolean Search Operators

For the purposes of a Boolean web search, these are the terms and symbols you need to know:

Boolean Operator Symbol Explanation Example
AND + All words must be present in the results football AND nfl
OR   Results can include any of the words paleo OR primal
NOT - Results include everything but the term that follows the operator  diet NOT vegan
NEAR   The search terms must appear within a certain number of words of each other swedish NEAR minister

Most search engines default to using the OR Boolean operator, meaning that you can type a bunch of words and it will search for any of them, but not necessarily all of them.

Not all search engines support these Boolean operators. For example, Google understands - but doesn't support NOT. Learn more about Boolean searches on Google for help.

Why Boolean Searches Are Helpful

When you perform a regular search, such as dog if you're looking for pictures of dogs, you'll get a massive number of results. A Boolean search would be beneficial here if you're looking for a specific dog breed or if you're not interested in seeing pictures for a specific type of dog.

Instead of just sifting through all the dog pictures, you could use the NOT operator to exclude pictures of poodles or boxers.

A Boolean search is particularly helpful after running an initial search. For instance, if you run a search that returns lots of results that pertain to the words you entered but don't actually reflect what you were looking for, you can start introducing Boolean operators to remove some of those results and explicitly add specific words.

To return to the dog example, consider this: you see lots of random dog pictures, so you add +park to see dogs in parks. But then you want to remove the results that have water, so you add -water. Immediately, you've cut down likely millions of results.

More Boolean Search Examples

Below are some more examples of Boolean operators. Remember that you can combine them and utilize other advanced search options such as quotes to define phrases.

AND

free AND games

Helps find free games by including both words.

"video chat app" iOS AND Windows

Searches for video chat apps that can run on both Windows and iOS devices.

OR

"open houses" saturday OR sunday

Locate open houses that are open either day.

"best web browser" macOS OR Mac

If you're not sure how the article might be worded, you can try a search like this to cover both words.

NOT

2019 movies -horror

Finds movies mentioning 2019, but excludes all pages that have the word horror.

"paleo recipes" -sugar

Locates web pages about paleo recipes but ensures that none of them include the word sugar.

Boolean operators need to be in all uppercase letters for the search engine to understand them as an operator and not a regular word.