If you spend any time in research, soon you’ll come across the term Boolean. In short, this is a way of writing your searches so you can create queries that are more targeted than simple keywords. Sounds great? It is but the way it’s written can seem baffling to newcomers. Don’t worry, here’s NewsWhip’s ultimate guide to Boolean. Soon you’ll be creating queries that will impress your boss and make you the envy of all your friends!
You can create boolean searches with the use of boolean operators and modifiers mentioned below. There is no limit to the number of operators or modifiers that can be used in a string. However, you need to make sure that you follow the rules explained in the rest of the article to get error-free results.
Boolean Search Operators
Boolean search operators are simple terms used as conjunctions for keywords. They are adjusting your queries to achieve more relevant results. In Spike search, you can use three boolean operators to build a query – AND, OR, NOT.
We will use Venn diagrams to visualise our descriptions for each operator and modifier.
1) Use AND to narrow your results
You can narrow your results by separating search terms with an upper-case AND operator. This will limit results to only those mentioning both terms.
-
Coke AND soda
In this example, your search will retrieve only articles/posts that mention both Coke and soda.
-
Coke AND soda AND bottle
In the example above, your search results will be limited to those that mention all three of the keywords Coke, soda, and bottle.
Remember that the more keywords you add with AND operator, the more specific, and targeted search results you will get.
2) Use OR to expand your results
When searching for content about an event or topic, you'll want to broaden your results by including synonyms and related terms. Using OR between two or more search terms will return results that contain either or all of them.
-
Coke OR soda OR bottle
In this example, your search will retrieve results that have either or all of the terms Coke, soda, or bottle.
Adding more keywords with the OR operator will increase the number of results.
3) Use NOT to exclude from results
You can narrow your search by filtering out results containing unwanted keywords by using the NOT operator.
-
“Diet Coke” NOT Zero
In this example, we're trying to find exact mentions of the Coca-Cola product Diet Coke, rather than those about the Coca-Cola Zero product. Using a NOT operator excludes all mentions of Zero from Diet Coke articles.
-
Coke NOT drugs
In this example, we're trying to find content relating to Coca-Cola product Coke. Adding a NOT operator for drugs will exclude all results mentioning coke as a drug.
TIP: As an alternative to the NOT operator, you can use minus to exclude the unwanted keywords.
Coke NOT drugs can be replaced with:
Coke -drugs
Remember that minus should be adjacent to the keyword you wish to exclude.
Boolean Search Modifiers
Apart from the boolean operators, you can also use boolean modifiers to further improve your queries and get accurate results. Boolean modifiers are just a set of symbols that we use in everyday life – quotation marks, parentheses and asterisk.
1) Use quotation marks “ ” to search exact phrases
You might have already noticed above that we used quotation marks before and after Diet Coke.
This is to make sure the full term is recognised as a single keyword (Diet Coke), rather than as separate keywords (Diet) and (Coke).
-
“orange soda”
This will return the articles or posts that mention the exact phrase of the Orange Soda.
2) Use parentheses () to combine searches
To create complex and advanced boolean queries, you will need to combine multiple searches with parentheses.
Let’s say you are looking for articles or posts about Coca-Cola’s different Zero products. In this case, Zero will be your must-have keyword, since you want all the articles to include it. If you are interested in Coke, Fanta, and Sprite Zero products, your search query would look like below:
-
(“Coca-Cola” OR Sprite OR Fanta) AND Zero
This will return the results that will mention Zero together with either Coca-Cola, Sprite, or Fanta.
If you are interested in both Coca-Cola Zero products and the Diet Coke product, you would need to put the above example into parentheses and add “Diet Coke” to the string with OR operator.
-
((“Coca-Cola” OR Sprite OR Fanta) AND Zero) OR “Diet Coke”
This will return the results that will mention either Diet Coke or any of the Coca-Cola, Sprite, and Fanta Zero keywords.
TIP: Make sure the number of opening parentheses matches the number of closed parentheses to avoid any errors.
3) Use wild card * to include all word variations
A single word can have many variations and you might not be sure which variation is being used in the articles/posts you are looking for.
Say you are interested in articles that mention advertising campaigns of Coca-Cola. If you only use advertising as a keyword, you would miss the articles that mention advertisement or advertise(s).
You can use the OR operator but your query will be longer as follows:
“Coca-Cola” AND (Advertisement OR Advertiser OR Advertising OR Advert OR Advertises)
The wild card modifier will capture these variations for you:
-
“Coca-Cola” AND Advert*
This search string will search for all the variations of keywords starting with Advert (Advertisement, Advertiser, Advertising, Advert, Advertise(s)) and will find the articles that include both Coca-Cola and one of those variations.
TIP: You can place the asterisk (*) both in the beginning, middle, or end of the word.
4) Don't use a wild card * with quotation marks
Our search system uses the asterisk * as a wildcard for word variations, but not when it's within quotation marks. For example, “advert*” will search for the exact phrase including the asterisk.
For searches involving exact phrases and wildcard terms, use quotation marks and asterisks separately. For instance:
-
("Coca-Cola" AND advert*) OR ("Diet Coke" AND market*)
This will find results that mention either "Coca-Cola" with a word beginning with "advert", or "Diet Coke" with a word beginning with "market". Remember, within quotation marks, an asterisk is treated as a literal character.
Bonus tip ✨
Use publisher: syntax to search posts with specific links
If you want to search for social posts that contain a link to a specific website, you can use the publisher: domain.
-
publisher: usatoday.com
This will return you the social media posts that include the link to usatoday.com
-
publisher:usatoday.com AND “Coca-Cola”
This will return the social media posts that mention “Coca-Cola” and links to usatoday.com
TIP: This kind of search would best work if you exclude the social accounts of the original domain. This makes sure that you only see results from other sources.
Comments
Please sign in to leave a comment.