What’s a Boolean Search and How Do I Use It?
When I think of Boolean operators, the first thing that comes to mind is Anne Boleyn, Queen of England who married Henry the VIII.
I am certain that there is no relation between Anne Boleyn and George Boole – the mathematician that conceived Boolean logic – other than that they were both from England and have similar last names.
Boolean operators are based on three little words: AND, OR and NOT. These operators can be used to narrow down – or, in some instances, broaden – results for any search term. Furthermore, you can use quotation marks to search for an exact keyword or keyword phrase.
In all truth, the use of Boolean operators can get rather confusing and complicated. But it does not need to be so.
Let’s take a closer look at how to build a great Boolean search.
Understanding Boolean operators
AND: This operator is used to find search results that include all the keywords or keyword phases contained on the string.
OR: Using this operator broadens your search to bring you all the results that contain at least one of the search terms you added.
NOT: This operator excludes unwanted results. In Raven, we use the minus sign (-) instead of NOT. Any keyword or keyword phrase that contains (-) will be omitted. As a note, the minus sign (-) should be placed at the beginning of the search term.
How to search with Boolean operators in Raven
The first thing to remember when creating searches is that the Boolean operators (AND and OR) need to be capitalized.
The simplest search you can perform is a single keyword or phrase without any Boolean operators. Simply type in your keyword and wait for the results. If a phrase is set up, results for any word in the phrase will be pulled. If I set up a search for bacon, I will see any mentions related to bacon, in any combination. If I search for Benton’s bacon, all the results returned will include both the words “Benton’s” and the word “bacon.”
Search with quotation marks
What if we only wanted mentions that included the specific phrase “Benton’s bacon” – those words, in that order? That’s the job of quotation marks. Add them around any phrase to get more specific and limit your search. Adding a keyword or keyword phrase with quotation marks will search for mentions containing the exact phrase.
Search with AND
Let’s say that we are looking for results related to both bacon and burgers. We could set up the following search: “Benton’s bacon” AND “Angus beef burger”. We’ll see all results that contain both of these exact phrases. Important note: If there’s a space between two words that aren’t in quotations marks in a search and the AND operator is not in place, then AND is implied. If we changed our search to Benton’s bacon AND “angus beef burger”, we would see results for the exact phase “Angus beef burger” plus any mention of Benton’s and bacon.
Search with OR
Let’s say that we are looking for results on either bacon or burgers. If I were to set up “Benton bacon” OR burger, we would see results that contain either the exact phrase “Benton’s bacon” or the word burger – either one of the terms or both.
Search with (-)
To exclude results, we’ll use the minus sign (-). For example, bacon -”smoked”. In this instance, we are looking for results that are related to bacon but we want to omit those related to smoked bacon.
Boolean operators can be combined, meaning that you can use AND, OR or NOT (-) in the same search. For example, a search like:
“Benton’s bacon” -”Farmland bacon” AND “hickory smoked bacon” -”uncured”
With this search, we are looking for mentions related to Benton’s bacon and hickory smoked bacon. Since a negated (-) phrase always implies an AND comparison, we are asking to omit those searches related to Farmland bacon and uncured bacon. Briefly the string is asking to find Benton bacon but not Farmland bacon and hickory smoked bacon but not uncured bacon.
Boolean tips and tricks for Raven Social Monitor
• Each search is limited to 200 characters.
• For a single keyword, no quotes are necessary. However, it is highly recommend to use them on keyword phrases, as you are looking for very specific results. For example bacon vs “Benton’s bacon.”
• Only 5 OR operators can be used in a single search term. Since a space in between to search terms implies OR, you can simply add search terms without the Boolean operator if you need to save space for that extra character or two.
• Avoid starting a search with a negative (-).
Preferred: “Benton’s bacon” -”Farmland bacon” AND “hickory smoked” “uncured bacon”
Not recommended: -”smoked bacon” “crispy bacon”. In this case the query is saying not smoked bacon nor crispy bacon, which probably won’t return any results.
No need to feel intimidated by Boolean operators any longer!