Lesson 3.4: OR and quotes

Access Lesson 3.4 slides here

Contents:

  1. Using quotes to keep words in a phrase
  2. Using OR to look for one word or another
  3. Combining quotes and OR in a query
  4. Tips for using OR correctly

In this lesson you will explore two new operators: double quotes to signify a phrase search, and OR to combine ideas together.

Start with an example using double quotes.

Double quotes are used to keep words together in a search. Imagine, for example, that you are searching for this rather obscure lyric that you happen to know that goes: when Venus the goddess of beauty and love. It is not immediately findable if you just type the words into the search box:

Figure: Results for the query [when Venus the goddess of beauty and love].

The number of words in the query causes problems. Notice that the individual words of the query are scattered all over the page, not kept together in the original phrase.

The goal is to focus the results on pages where those words appear in the phrase. Inserting quotation marks before and after the phrase will force the words to stay together, in the order they appear in the query: [“when venus the goddess of beauty and love”].

Figure: Results for the query [“when venus the goddess of beauty and love”].

Now, the very first result is from a song called "Nottingham Ale." The very first line contains the phrase: When Venus the goddess of beauty and love. The quotes limited the results in a very precise manner.

The same trick works when you are looking for a name. For example, searching for the name [Daniel M. Russell]. That query works, but results may not always exclusively focus on the instructor of this course. When searching for that precise individual, I quotes do the trick again: [“Daniel M. Russell”].

The other operator is OR. It provides a way of combining ideas so that you can search for pages including at least one out of a set of related terms or synonyms.

For example, if we go back to our Tesla coil example, a similar idea to a Tesla coil is a Jacobs ladder. It is another device that mad scientists use to cause lightning to crawl up between two wires. But you can combine those two quoted phrases using a single query: [“tesla coil” OR “jacobs ladder”].

Figure: Results for the query: [“tesla coil” OR “jacobs ladder”].

If you think about the single query [tesla coil], it gives you a certain set of results. When you combine Tesla coil with Jacobs ladder with an OR between them, always in all capital letters, you get a larger number of results. Google looks for any page that has the phrase Tesla coil or the phrase Jacobs ladder.

Using OR, you get some pages with Tesla coil, some pages with Jacobs ladders and some pages with them both. Now you can actually now start to search for larger, synonymous sets of ideas.

As an example, think about the fish pedicures. Since there were a number of terms used to describe the concept, you can use OR to look for pages containing any of them--but all in one search: [“fish pedicure” OR “fish spa” OR “doctor fish”].

Figure: Results for the query [“fish pedicure” OR “fish spa” OR “doctor fish”].

When you look at your results, notice that the bolded terms are the words that Google found that it perceives matches the words you entered in your query. In this case, fish spa, doctor fish, and fish pedicure. You see these different results here as a consequence of using the OR.

A few things to know about using OR:

1. OR is all capital letters

  1. Effective:         [uk OR england]
  2. Ineffective:        [uk Or england]
  3. Ineffective:        [uk or england]

2. OR acts on the words touching it

  1. Effective:         [“tesla coil” OR “jacobs ladder”]
  2. Ineffective:         [tesla coil OR jacobs ladder]
  1. Generally, OR only applies to the words directly on either side of it, so search engines read [tesla coil OR jacobs ladder] with the OR only applying to coil and jacobs.
  2. Google interprets this query to mean that you want all the pages to have the words tesla and ladder, since they are not next to an OR. Only putting the two names in quotes, you make the OR apply to tesla coil and jacobs ladder as set phrases.

Another example would be looking for [pleurisy], which you can define very quickly using our search as you type feature. Pleurisy is an inflammation of the lining of the lungs.

If you happen to know another term for pleurisy is pleuritis, you can search for [pleurisy OR pleuritis]. Now you are searching for both terms as synonyms for each other.

Figure: Results for the query  [pleurisy OR pleuritis].

The key idea to remember is that OR allows you to take two terms or two phrases and search for both of them together, most often used when you are looking for synonyms for the same idea, like pleurisy and pleuritis.

This is a powerful combination when you want to look for one short phrase or another short phrase. That gives you phrasal synonymy, which is a really powerful technique for filtering and focusing in on your results.

Give the activity a try to practice using these operators.


Power Searching with Google © 2012 Google, Inc.