How do Boolean searches work?

Tips on understanding Boolean operators and brackets

Jack Morel-Paulo avatar
Written by Jack Morel-Paulo
Updated over a week ago

Boolean query is an instruction given to computers to search and return posts based on them containing/not containing specific words according to the operators below:

To learn more about how to choose the right keywords click here.

Your query should make logical sense if you were to read it out at the end. e.g. if you were searching for people who talk about the future of quantum computing you might have a query that would return posts that contained the words (quantumcomputing OR “quantum computing”) AND future. But as queries get longer, it becomes more difficult to keep a handle on the logic. 

To help with constructing Boolean queries, we suggest following the steps below:

  • Clearly define what you would like your influencers to be talking about

  • Break that down into the basic language requirements that make it up e.g. people talking about emerging health tech is made up of three language requirements 1. Emerging 2. Health 3.Tech

  • Write each of these as the heading of separate columns

  • In each column brainstorm and research alternative ways of saying the same thing to ensure you are offering as many opportunities to capture the conversation as possible. Separate these keywords and phrases with OR.

  • If you come across keywords that cover more than one of those language requirements (e.g. #healthtech = health AND tech, crowdfunding = startup AND funding) start a new column with the header showing the two language requirements together

  • Once you are finished researching your keywords draw lines to link each column with the other columns it needs to be combined with in order to meet the full language requirements of your query

  • Write your query out in full, using brackets to group your keywords together. Brackets help the computer to know what goes with what and where it should start. It provides the query with a sort of hierarchy like in maths where (3+2) x 5 = 25 but 3+2x5 = 13. As a general rule, the hierarchy goes as follows: 

  1. keyword synonym lists (your columns of key words)

  2. keyword lists combined together to form the full language requirements

  3. alternative combinations of keyword lists to form the full language requirements

  4. any keywords you wish to exclude from the query. 

Example to find people talking about visa issues for doctors:

It is important to notice that the keyword list for Doctors has to be repeated in order to be combined with Visa Issues separately from the Visa and the Issue keyword list. Otherwise you would end up with a query that would be overly prescriptive because very few people would say visa AND issue AND visaissues in the same social post.

Did this answer your question?