Become Better At Finding Stuff With Search Engines: Boolean Search Logic Explained

Ads by Google

boolean searchThe number of websites currently in existence is unimaginable. And while – on a bad day – it only takes Google’s thousands of servers half a second to query approximately 50 billion indexed pages, it takes you significantly longer to scan only the first page of search results. On top of that, you are likely to digress and open irrelevant sites. Why don’t you do your constantly distracted and easily overwhelmed brain a huge favor and learn how to properly construct a search?

Boolean search logic illustrated in Venn diagrams can help you visualize what you are searching for. If you think this sounds suspiciously like mathematics, you’re spot on. But don’t let that discourage you! It’s pure and simple logic, demonstrated with pretty and very simple diagrams, and so it’s easy. I promise! And I have fun examples to prove it.

The only case in which you won’t need any search logic, is when you search for only a single word, like Earth.

boolean search

What Is Boolean (Search) Logic?

In a search query, Boolean logic helps us define the logical relationship between multiple search terms. The operators used to express the relationship are AND, OR, and NOT. Any number of boolean search terms can be connected with these operators to refine your search results. Let’s look at each operator separately.

OR

  • search results will contain either one or several or all of the search terms
  • best used when you want to pull together results on similar topics

Example: Wind OR Fire

boolean search engine

The Venn diagram above reveals that a search for Wind OR Fire will show results for Wind, Wind AND Fire (overlapping areas), and Fire.

Ads by Google

Example: Earth OR Wind OR Fire

boolean search engine

Likewise, this diagram demonstrates that all boolean search terms by themselves, as well as overlapping content will be shown when connecting the terms with OR. And here is a chance to earn a Like including 5 bonus points if you can tell me who those folks in the center are.

Here are the numbers for Google’s search results for the three search terms and the OR combinations shown above:

  • Earth: 1,280,000,000 results
  • Wind: 909,000,000 results
  • Fire: 2,090,000,000 results
  • Wind OR Fire: 2,980,000,000 results
  • Earth OR Wind OR Fire: 4,210,000,000

As you see, in the case of a Google search, the whole is not greater than the sum of its parts; it’s actually smaller. But since there is redundancy, i.e. overlapping areas, as can be seen nicely in the Venn diagrams above, that makes sense.

Instead of OR you can also use the vertical bar | character when performing a Google search.

NOT or rather -

  • exclude keywords from your search
  • best used when your search is ambiguous

Caution: While NOT is a valid term in Boolean logic, Google doesn’t appear to operate with this term. Instead of NOT, you should use the - character. Note that there is no space between the dash and the keyword you want to exclude.

Example: Wind NOT Fire or Wind -Fire

boolean search

The Venn diagram above depicts the results in theory. Below are the actual numbers:

  • Wind: 909,000,000 results
  • Fire: 2,090,000,000 results
  • Wind NOT Fire: 377,000,000 results
  • Wind -Fire: 1,810,000,000
  • and just for fun… Fire -Wind: 5,010,000,000 results

The numbers will vary, depending on which Google domain you are using (my browser defaults to Google.ca) and obviously they also change over time. However, the results above are nothing short of confusing. Let’s say that Google doesn’t necessarily give us all the results, so those numbers are not a reliable source of information. Looking at the first page of results, however, can give you an idea of whether or not your search worked.

boolean search method

Actually trying to understand the results quickly reveals that Google tends to think for you, rather than with you. For the majority of users that’s good because they don’t know what they are doing. Google appears to serve results based on its “experience” rather than the search terms and operators used in the query. This actually is a little disturbing, but good to be aware of. So let’s continue with the theory…

AND

  • search results will contain all search terms
  • results where one of the terms is missing will be excluded
  • best used when you want to retrieve only those results where the search terms overlap

Example: Earth AND Wind AND Fire

boolean search method

Once more, the numbers:

  • Earth: 1,280,000,000 results
  • Wind: 909,000,000 results
  • Fire: 2,090,000,000 results
  • Earth AND Wind AND Fire: 80,500,000
  • and just for fun… Earth Wind Fire: 86,800,000

At least Google cooperates with this boolean search operator. Mind you that AND typically is the default operator in search engines. So whenever you type in more than one keyword, the search engine will automatically connect them with the AND operator. Hence Earth Wind Fire in theory will yield the same search results as Earth AND Wind AND Fire.

Processing & Nesting

You can connect multiple search terms with different operators. But since Boolean logic operates based on mathematical principles, the order in which you connect your keywords will have an effect on your results. To influence your results, it helps to understand how the terms are processed. Per default, keywords are processed from left to right.

Example: Earth AND Wind OR Fire

boolean search method

If you want to change the order in which your keywords are processed, you can of course literally change the order. You can also enclose a set of search terms and operators in parentheses, i.e. nest them. Processing will still be left to right, but the nested elements will be treated as one unit.

Example: Earth AND (Wind OR Fire)

boolean search

This result looks quite different, doesn’t it?

Conclusion

It’s generally good to know how Boolean search logic works when you are working with search engines, at least if they strictly adhere to those operators. Apparently, Google does not, meaning a simple search will often get you exactly what you need, without having to think about it. If you do want to be sure that Google does what you want it to do however, use Google’s Advanced Search. The field all these words corresponds to the AND operator, any of these words equals OR, and none of these words works like NOT. Now you should be able to narrow down your searches a lot better – in theory.

If you desire to become a real power user, I recommend reviewing our article on how to master Google search operators, or how to reduce irrelevant results, or which tricks to use when you don’t know what to search for , or simply review Google’s list of search operators.

Have you ever had trouble getting Google or another search engine find what you were looking for?

Ads by Google
Comments (53)
  • David

    But you can’t do the + and “all words in the quotes in that order” thing anymore!!!

    Woe is me!!!

  • Josh M

    Great way of explaining! Thank You

  • Joel Wavrecan

    Earth, Wind, and Fire. An American band that has spanned the musical genres of soul, disco, R&B, funk, jazz and rock. (ref.Google)

  • Stephanie Staker

    Gotta tell you that you lost me. Remember now that I am a senior citizen pushing 70 and I have NEVER figured out boolean logic. After the first few sentences of this article, I started falling asleep and, Tina, that is not your fault. It is mine. I have consistently had problems finding what I am looking for in the “real world” as well as online. My belief is that you have to know how the person who “assigned” the place where your/my info is located, thinks. Stay with me here: many years ago, I was taking classes to become a certified paralegal. One of the classes was on doing research which is really important to know in order to get a job in this field. I had one heck of a time. My logic is not the annotated statute logic so it was a constant battle for me to find the info I needed. Fortunately, in today’s digital world, all of this legal stuff is on DVD along with various search engines that “speak” to all of us. What I mean is that there are search engines out there who think like I do so “we” (the search engine and I) are able to find what I am looking for. Back to this issue of the boolean search stuff, I find that doing a search in Google (my favorite search engine) is pretty handy and sometimes scary. It generally reads my mind after I type the first few letters of my search query. The page appears magically and more often than not, what I want to know is the first thing on the list. :)

  • null

    I used to use Boolean operators all the time. It made for very specific search results. I still use them once in a while but now it seems most search engines just seem to ignore them. Too bad. Making it easier seems to have made it less useful.

Load 10 more
Affiliate Disclamer

This review may contain affiliate links, which pays us a small compensation if you do decide to make a purchase based on our recommendation. Our judgement is in no way biased, and our recommendations are always based on the merits of the items.

For more details, please read our disclosure.
Affiliate Disclamer

This review may contain affiliate links, which pays us a small compensation if you do decide to make a purchase based on our recommendation. Our judgement is in no way biased, and our recommendations are always based on the merits of the items.

For more details, please read our disclosure.