MonkeyDoIt! Simple Instructions
Home > Computers > Internet Tips



How to Use Boolean Search Operators




How do I use Boolean search operators to find things when I search the Internet?

What is a Boolean Search?


A Boolean Search is named after George Boole who came up with a type of linguistic algebra that uses AND, OR and NOT. George Boole's publications "Mathematical Analysis" and "Investigation", brought forth Boolean Logic. So when performing a Boolean Search you are essentially using Liguistic Algebra!

How do I use Boolean search operators to find things when I search the Internet?

A boolean search might look like this: toads AND stools , or toads OR stools, or toads OR stools AND ponds, or even ( toads OR stools ) AND ponds. This can get kind of confusing but it's important to see some examples in order to familiarize yourself with the idea here. Just know the Boolean Operators AND, OR and NOT exist between keywords and each operator has a different purpose which will effect your search results in different ways. You see the last example even uses parenthesis ( ) which is called nesting and has a specific purpose that will be explained below. Please note AND , OR operators are not exactly the same as the English language equivalents. For the purpose of this page we are not going to discuss anything other than the basic boolean operators.


Basic Boolean Search Operators

AND means "I want only results that contain both words."

OR means "I want results that contain either word."

NOT means "Exclude all results containing a specific word."

( ) means "Execute the operator inside parenthesis first."



What is the Order of Bolean Operators?

Usually AND and NOT searches are executed first, followed by OR searches. Unwanted search results may arise for users that are unaware of the correct order of Boolean Operators.



Venn Diagrams of How to Use Bolean Operators
alien
Boolean Search usign AND operator - alien AND mars represented using a Venn diagram
Venn diagrams are useful for illustrating Boolean Searches. In this example the user conducted a search for alien. This is represented by the tan shaded area. Results would contain information with the word alien.
alien AND mars
Boolean Search usign AND operator - alien AND mars represented using a Venn diagram
Results containing information on both alien and mars

alien OR mars
Venn diagram using OR operator for boolean search
Results containing information on either alien or mars
alien NOT mars
Venn diagram using the NOT operator for Boolean search
Results containing information on alien not mars

alien OR mars AND green
Venn diagram using OR AND operators for a Boolean search
Lets pretend there are many types of aliens but we are only interested in green ones on Mars. alien OR mars would return too many results on just the planet Mars or aliens in general. The more specifc AND would also still be too broad. It might seem logical that since we are interested green aliens on Mars a search like the example shows, alien OR mars AND green would be the solution. To some extent this will work but there are problems here. The search does not read Boolean operators from left to right but instead reads the mars AND green operator first. If you study the shaded area here you may have noticed the result you intended should look quite different with alien and mars fully shaded at the top and green appearing like it is. As you can see, using operators in this way can lead to unwanted search results. See the next example >>
(alien OR mars) AND green
Venn diagram showing alien OR mars AND green using paranthesis for a Boolean search
alien AND mars AND green
Venn diagram using AND operator more than once for a Boolean search

As you can see from the example above (alien OR mars) AND green , produces a completely different result since nesting an operator inside ( ) means the OR operator will be executed first. Does this produce better search results than the last example? It does if you are interested in an equal distribution of alien and mars related infomration that contain the word green. In the last example alien AND mars AND green would probably be the best way to narrow the search results to more relevant information.

TIP: Many popular search engines like Google will treat any blank space between keywords as AND. So instead of writing alien AND mars AND green, you could simply enter alien mars green.