Using Google more efficiently part II: Boolean operators
Posted by Greten on 03 May 2013 under Tools
This entry is the second part of a serial post about using Google more efficiently for your research. Click here to get an overall preview of what this topic is all about although you may also proceed in reading this article. You will still understand it without reading the introduction part.
The Boolean syntax are AND, OR and NOT. They are commonly used in programming but don't worry, they are very easy to use in Google. What we will be able to do here are as follows: (1) tell Google to show all web pages containing all the searched words, (2) tell Google to show all web pages containing ANY of the searched words, and (3) tell Google to remove web pages containing specified word(s) from the search results.
If you enter keywords, just keywords and nothing else, Google will work as if the AND operator is being used. Meaning, it will return as results all websites that contain the keywords. For example, you type the following in the search box:
addition whole number
The search results will show all web pages containing the words "addition", "whole", and "numbers". It will not include web pages that contain "numbers" only but contain no "whole" and "addition". If a web page contains "addition" and "numbers" but not "whole", it is also not included among search results.
Note that there could be some exceptions to this. Say you type the words "addition", "whole", and "number" in the search box. You clicked one of the links. Using the browsers search function CTRL+F, you found out that there's no "addition". One explanation here is that there are certain websites that link to that page you are viewing, with the word "addition" as the text link or part of the text link. Google then associate "addition" with this page as if the word is within the content.
The results of AND operator is affected by the sequence in which the keywords are encoded. Those that contain the exact phrase in which the keywords are arranged are likely to be on top. For example, typing 'addition whole number' (without quotes) in the search box is likely to have the pages containing the phrase "whole number" on top of search results. The result would not be the same if you type in the search box 'whole addition number' (without quotes).
Using OR operator
If you enter keywords, Google will show in search results all web pages in its index that contain the ALL keywords. What if you want to see the web pages that contains either of the keywords but not both of them?
You need to include the OR syntax in your search. For example, you are researching about gravity and relativity. If you entered 'gravity relativity' (without quotes) in the search box, most of the pages in search results will be about Einstein's General Relativity since it is the topic in which the words "relativity" and "gravity" appear often. If you want to include pages that are about Newton's Universal Law of Gravitation as well as those about Special Theory of Relativity, you need to encode your search keywords in the Google search box like this:
gravity OR relativity
Note that the OR must be in capital letters. If you encoded them in lower case or either letters in lower case, Google will not accept it as operator and the results that will appear is as if there's no OR between the words, which is the default AND. If there are three or more words and you would like to include web pages containing any of them in the search results, you need to include OR in between each of them. For example, you are searching for information about dogs, cats and bears but you want to include web pages that talk about dogs only, cats only and bears only. You encode it in the search box like this:
dog OR cat OR bear
Unlike the AND, the OR operator returns the same results in the same arrangement regardless of how you arrange your keywords. Typing 'dog OR cat OR bear' (without quotes) in the search box will yield the same search results as 'cat OR bear OR dog' (without quotes). This is the case while I'm working on this article but it might change in the future since Google (and other search engines) continuously change their algorithm.
I noticed recently that Google includes the OR results under the AND results if there are very few AND results. If you type [keyword1], [keyword2] and [keyword3] in the search box, and there are less than ten (10) web pages containing all three keywords, the web pages containing [keyword1] only, [keyword2] only or [keyword3] only, or any two combination, will be displayed but grouped separately from those containing all three keywords. There's also an indicator which of the keywords a particular web page do not possess (indicated by strikethrough). I am not sure if this happens only on very few results, or if it happen all the time with the OR results only buried several pages at the back of search results.
Combing AND and OR
Suppose you want a search results of web pages containing certain keywords. Some keywords are required and some are optional. For example, you are looking for a variety of word problems in addition and subtraction. If you encode 'word problem addition subtraction' in the search box, you will miss web pages that discuss math problems in either addition only or subtraction only, which you will also find useful.
To find pages about word problems about either addition or subtraction only, you need to encode the keywords as follows:
word problem addition OR subtraction
You might find this confusing as it looks like you are searching for web pages containing all three keywords "word", "problem", and "addition", and at the same time looking for pages containing "subtraction" only. That's not the case. You can think of it as Google grouping the words on either side of the OR operator as optional keywords. The web pages must contain either but not necessarily both of them to be included in the search results. However, those web pages that are not adjacent to the OR operator are mandatory.
How about if we have more than one optional keywords. Simply put OR between them so that all optional keywords are adjacent to at least one OR while the required keywords are not adjacent. For example, we want to search about word problems, but we want the results to include any of the four fundamental operations. We can encode the following in the search box:
word problem addition OR subtraction OR multiplication OR division
Notice that the keywords "word" and "problem" are not adjacent to any instance of OR operator. Thus, the pages in the search results always include both of them, but may include "addition" only, "subtraction" only, "multiplication" only or "division" only, or all four of them, or any combinations of two or three of them.
Using negation or NOT operator
The purpose of negation, which is analogous to NOT operator in programming, is to remove from the search results web pages that contain certain keywords. This is particularly useful if you are doing a search using two keywords and these two keywords are usually associated with a third keyword, but you don't want the results containing the third keyword.
For example, I tried searching for information about the fact that animal of phylum porifera, commonly known as sponge, can reform themselves when grinded in a blender. Thus, I encoded the following:
To my surprise, several results in the first page discusses some sort of beauty products. Since, I do not need these results, I changed my keywords into following:
sponge blender -beauty -cosmetics
Basically, the dash (-) here acted as "anti-keyword". It tells Google to remove the pages that contain the keyword that comes after a dash. Note that there is no space between the keyword and the dash.
There are still few remaining pages about the beauty product. The ones that use the term "make-up" instead of "beauty" or "cosmetics" but most of the results are now about the sponge-in-blender experiment.
I suppose that's all for now for Boolean operators that you can use in Google search. In my next post I will discuss non-Boolean syntaxes which includes exact search and wildcard search.
Share your thoughts
* Required. Your email will never be displayed in public.