August 31st, 2009

Nesting Your Search Terms

Nesting. Nope, not the kind that birds make. The nesting I’m talking about is used to control how the database treats your search terms when you’re building your search in a database or online. russiannestingdolls

By now you have probably heard of the Boolean Operators: AND, OR, and NOT. These connectors are used between your keywords to tell the database how you want to combine your words and what kinds of terms should be present in your search results. But what happens when you need to use different connectors (maybe a combination of ANDs and ORs) in one search box? You need to “nest” your terms!

Nesting involves putting parentheses around like concepts to keep them together. These parentheses are also code for the database to perform the command that’s inside of the parentheses first before adding what is outside of the parentheses, just like in math equations. Take this search for example:

alcohol AND (adolescents OR teenagers)

With this search the database will retrieve articles on alcohol AND adolescents or alcohol AND teenagers. Without the parentheses the database takes your search terms literally and will search for your terms in the order you type them. For instance, if you removed the parentheses from the bolded example above, you would find articles on alcohol and adolescents as well as articles on teenagers (without the alcohol aspect).

And sets of parentheses can be nested inside other sets of parentheses, like Russian nesting dolls.

(Alcohol OR drug OR (substance N3 abuse)) AND (teenagers OR adolescents)

Remember, the command inside the inner-most parentheses always gets processed first.

Nesting your terms comes in particularly handy when searching online in search engines like Google. Google does recognize Boolean Operators like ANDs and ORs and will obey search commands like using parentheses in your search! By nesting your search terms, you are better able to control how Google handles your search terms. And when you’re searching millions upon millions of information sources, every little bit helps. Next time you’re searching in Google, try nesting your terms and see how your search results change!

If you would like further explanation on how nesting works in the databases or online, give us a call in the library and we can walk you through how to effectively use this concept.

–Jennie

Comments

Pingback from Reference List « kimdonovaniwm14
Time December 15, 2011 at 10:10 am

[…] J. 2009. Nesting Your Search Terms. [Online]. Avaliable at: http://www.capella.edu/blogs/library/2009/08/31/nesting-your-search-terms/ [Accessed: 10 October […]

Comment from John
Time April 20, 2012 at 8:03 am

Interesting post, thanks. However, to the best of my knowledge, Google doesn’t honour parentheses or nested operators in search terms. For example, the search:
(cytochrome AND cellulose) OR (vampire AND dragon)
is interpreted as ‘must include cytochrome and dragon and any of cellulose or vampire’. This can be confirmed by submitting the Google query and then going to Advanced Search. Note also that the above phrase could be written more simply as:
cytochrome cellulose|vampire dragon

It’s a shame that Google can’t interpret parentheses the way we’d expect.

Comment from kstaley
Time April 23, 2012 at 9:39 am

Thanks for writing, John. I believe that you’re correct. However, it’s my understanding that at the time this post was written, almost 3 years ago, Google did accept parentheses. They have changed several features about their search since then. Looks like it’s time for an updated post!

Write a comment