Research Skills Blog

Research Basics: Using Boolean Operators to Build a Search

Research Basics: Boolean Operators | IFIS Publishing

Boolean operators are the bones of any good literature search. These operatorsor connecting wordstell a database how to combine search terms. Researchers use them to configure their searches to find more precise and relevant results. Knowing how to use them correctly makes all the difference between a frustrating and a satisfactory searching experience.

There are three main search-building Boolean Operators—AND, OR, and NOT.


AND

AND is used to indicate that both terms are present in the results, or all terms if you connect more than two terms with AND.

Helpful to know:

In some databases (like PubMed) you need to capitalize your Boolean operators, and in others (like Web of Science) you don’t, but it never hurts to capitalize them. So go ahead and do it!

In the diagram below, one circle represents results that have the word packaging in them, one represents results with logistics in them, and the final circle represents results with fish* in them. When you connect all the terms with AND, you’ll know that the only search results you see will contain all three terms, which is represented by the orange overlap of all three circles.Boolean operators | IFIS Publishing

Depending on where you are searching, your AND search can look like this:

Boolean operators | IFIS Publishing

Or this:

Boolean operators | IFIS Publishing

Or this:

Boolean operators | IFIS Publishing

All three configurations above are the same search.

Each additional term or concept that you add with AND will make your search more specific and targeted. Be aware that if you add a term with AND that is the “wrong” term, perhaps capturing an idea with a different word than researchers use, you risk missing relevant results.

Helpful to know about AND

In some databases, if you don’t type a Boolean operator between words, the database will treat those words as though they have an AND between them. For example, any databases on the Web of Science platform do this. In others, such as any on the EBSCOhost platform, the database will treat the words as though they are either right next to each other (as a phrase) or close to each other. Exactly how close will depend on behind-the-scenes decisions made by your university library.

 

To check what’s happening in a database, run a search with two words with an AND, and then run it again without the AND. If the number of results is higher with the AND than without it, you’ll know that you need to type AND to avoid having the database treat your terms as a phrase or as adjacent terms. We will go into what this means in our upcoming blog post 'Research Basics: Phrases and Proximity'.

 

PubMed combines these approaches. It will pick up some words as phrases that it maps to MeSH headings, but words that don’t correspond to those headings will be treated as though they’ve been typed with an AND. See exactly how PubMed has interpreted your search by looking at the search details on the advanced search page.


OR

While AND refines your search, OR broadens it. Use OR to capture concepts that might be represented with two or more different words. It can be a safeguard against missing results because you’ve used the wrong term, or because researchers have used different terms or different spellings in different parts of the world and over time to capture the concept.

In the diagram below, we use three related words that can all cover the same concept. When we connect each word with OR, we are telling the database that we are happy to have results that have fish in them, or results that have seafood in them, or results that have “sea food” in them. Results could also have both fish and seafood in them, or seafood and “sea food”, or “sea food” and fish, or all three terms. As long as one of the terms appears in the record, it will be included in the results list.

You’ll notice that, strictly speaking, fish and seafood aren’t synonyms, but they are related terms and might both be relevant to your search. This is something that you, the searcher, get to decide. Your decisions about what makes sense to connect with OR should be informed by the language that you see researchers using as you start scanning your results. You don’t need to restrict yourself to only two or three terms in an OR string. You could also, in this example, add in OR salmon OR trout OR sardines and on and on.

Boolean operators | IFIS Publishing

Depending on where you are searching, your OR search might look like this:

Boolean operators | IFIS Publishing

Notice that the string is typed in one search box and is contained within parentheses. It is generally a good idea to keep each concept that is captured by an OR string in one search box. The parentheses tell the database to keep these terms grouped together as a single concept. Some databases will automatically add in the parentheses around what you’ve typed in a single search box, and others won’t—but it never hurts to add them yourself.

Your OR search could also look like this:

Boolean operators | IFIS Publishing


NOT

NOT is a powerful, potentially dangerous Boolean operator that must be used with caution. The problem with NOT is that it removes results, and when they are gone you can’t see them so you don’t know if they were removed for the reason you thought they would be.

In the diagram below, all the results that will be returned will have the word potato in them unless they also had the word sweet in them.

Boolean operators | IFIS Publishing

In general, it’s safer to refine a search using AND rather than NOT, but there are times when NOT can help you check if your search is doing what you hope and think it is doing. For instance, you could run this search below to decide if you really want to keep “sweet potato*” together in a phrase, or if it would be better to connect the words as sweet AND potato*.  

Boolean operators | IFIS Publishing

Notice that to execute this search you need to put potato* AND sweet inside parentheses to indicate that that search needs to happen first before the phrase “sweet potato*” is removed. That will let you see all the records that have the words sweet and potato* in them unless the words are together as a phrase.

Combing Boolean operators

In the search above, AND was combined with NOT. For many searches you will want to combine different Boolean operators. Depending on what kind of search interface you are using, you can either build it all in one go, or you might need to do it step by step.

The way that you are most likely to build a search is to gather together a number of words to represent each concept, and then combine each concept to intersect with the others, like this:

Boolean operators | IFIS Publishing

Or this:

Boolean operators | IFIS Publishing

Or this:

Boolean operators | IFIS Publishing

Remember that a database will process, or group together, what you’ve put inside brackets first, so be sure to group together what should be together. Otherwise many will read your string left to right, although others will do something harder to deduce. To get a sense of how important the parentheses are, searching fusarium OR hydrophobin* AND gush* OR flow* AND beer* OR ale OR brew* OR malt* in FSTA on the EBSCOhost platform brings back 71,842 results, but searching (fusarium OR hydrophobin*) AND (gush* OR flow*) AND (beer* OR ale OR brew* OR malt) brings back 86, all of which actually do have each of the concepts in them.

Boolean operators can be a bit confusing, but with a bit of practice and care it is easy to become adept at building search strings that return results that are relevant to the research you are pursuing.


For more information about laying the foundation for strong search skills, we will soon be publishing the following blog posts:

  • Research Basics: Phrases and Proximity

  • Research Basics: Truncation.

Please check back soon or sign up for the Research Skills blog mailing list to hear when these are live.

You may also be interested in learning the difference between a systematic review and a systematic literature review, or  literature searching best practice.


Subscribe to our Research Skills blog