Skip to main content
All CollectionsCreate and edit topic How to create a topic
Example. How boolean operators can help you find the most delicious burger
Example. How boolean operators can help you find the most delicious burger

An example of how boolean operators work

Alina Kostygina avatar
Written by Alina Kostygina
Updated over 2 months ago

In this article, you'll find out how to get the most out of monitoring topics without the risk of missing out on important mentions.

What are Boolean search operators?

Boolean search operators are useful conjunctions that help optimize the search. If you set “burger” as a search object, then the Booleans could be “crispy fries” and “unlimited cola” that accompany burgers and make it even tastier:).

Of course, the system can simply find the keyword that you entered into the search field. However, Booleans will make the results more accurate, and ensure that these results are the best match for your task. The best part is, these operators are easy to use.

Basic Boolean operators

Basic boolean operators are OR, AND, ​/n (distance between words), AND NOT, Stopwords, Quotes and Parenthesis. You can read more information on each operator in the article Search query language. Let's see how these operators can help us to find the most delicious burger.

“Quotes”

Sometimes a search query is not a single word, but a specific phrase. Imagine you want to find a “Classic burger.” If you write “classic burger” without any operators, you will find all the mentions that contain these two words regardless of their position in a sentence or paragraph. Even if the word “classic” is in the first sentence, and the word “burger” is in the fifth. In such a case, the search results are irrelevant.

To limit the search to an exact phrase, you need to add quotation marks like so:

Query:

Now we’ll get only relevant results that contain the “Classic Burger” phrase:

“AND” Operator

What if you want a “beef” burger? You can do a specific search for the phrase “classic beef burger,” but this way you’ll only find the mentions with the exact phrase (same words in the same order). We may skip a classic minced beef burger, a classic burger with a delicious beef patty, etc.

What do you need then? The operator "and." It will help you connect the "Classic Burger" and beef keywords. We will find the mentions with both the phrase and the necessary clarification:

Query:

But there is a catch. When searching for beef burgers, we’ll also see the posts with “pork” mentions. And although such a burger is also very delicious, it is said that a pure beef patty is healthier, so you need to narrow the search down.

Stop words

To cope with this task, you will need stop words . With their help, we can exclude the mentions that contain irrelevant information. You should complement your search query with the words that you don’t want to see in the post. For this, just mark these keywords at the end of your search request with a minus in front of them "-":

Query:

Now it works:

"AND NOT" operator

The stop words will affect all your search query. That is to say, the system will not collect mentions that contain the word "pork" at all. What can you do if you'd like to look for a burger excluding pork but all the types of Hot Dogs (including pork). AND NOT operator will help you here as it can be applied only to the part of the query.


Query:

With such a search query, you'll be able to find a "Classic burger" excluding pork, but for Hot Dog this rule will not be applied.

Slash operator “/”

It helps to control the relevance of mentions. Using / (slash), you can specify a condition to determine the distance between search words. For example, let's say you think about healthy eating and an upcoming vacation, and want to find a vegan burger. For the mentions to be relevant, these words must be located nearby, for example, within 3 words.

Query:

Specification “/3” means that there should be no more than 3 words between “vegan” and “burger”.

Great, you see the results you need! Now you can call yourself a “healthy eater”

“OR” operator

Hungry? Not so much? If a Vegan Burger is not your cup of tea, you can try any other type: Chickenburger, Spicy Burger, Mexican, etc.

The operator "OR" is at your service for this task. It will help you find everything at once, you should just write down the keywords and connect them with “OR”:

Query:

Now the results include mentions containing all these words. It’s worth noting that each of the posts could contain both all the specified words or only one of them. So you can take a look and check on the burger that catches your attention first:

Uniting Boolean operators with brackets “()”

Super, now you know all the basics and can put them together to complete an unusual task.

For example, this week you want to save some money, so you are looking for pork or beef burgers with a discount, and let’s suppose you are allergic to mushrooms. For the system to correctly understand your search query, you need to correctly group the keywords and specify the sequence. Brackets will come to the rescue. It is possible to quickly build a complex query by utilizing simple operators:

Query:

That’s exactly what you need:

Advanced operators

To make your query more precise, you can use the advanced operators:

Country: - collects mentions only from a specific country;

Language: - collects mentions in a specific language only;

Source: - helps you monitor only certain sources (e.g.: Facebook, Instagram, TikTok etc);

SourceType: - helps you monitor specific types of sources (e.g.: social networks, news, blogs, forums etc);

PostType: - helps you collect only specific types of posts (e.g.: comments, posts, reposts, extended reposts);

ContentType: - helps you collect only specific type of content (e.g.: images).

Title -use to match mentions by the post title (e.g., to find news articles where brand name mentioned in a news headline)

Let’s imagine that you need to find Burger discounts only in the USA. You can narrow the search to USA country and English language.

Query:

With such a query, you will find the burger on discount only in the USA and only in English.

You can even precise your search to a specific source or post type:

Query:

Author based operators

PublicationPlace .nickname: used to find mentions posted on pages with specific nicknames (e.g Netflix).

PublicationPlace .name: use to find mentions posted on pages with specific names. E.g (american /1 burger) will collect mentions posted by any authors on the pages that contain “american burger” or “burger american” in their name.

Author.nickname: used to find mentions posted by authors with specific nicknames. author.nickname:"vancityreynolds" will collect mentions of authors with “vancityreynolds” nickname.

Author.name: use to find mentions posted by authors with specific names. author.name:(Ryan /1 Reynolds) will collect mentions by all authors with “Ryan” and “Reynolds” in their name, like Ryan Reynolds or Ryan Reynolds Fans

If you’d like to monitor the specific food blogger and precisely his/her posts about burgers, the author.nickname or author.name operator will help with this task:

Query:

So you will see mentions about burgers posted only by this specific author.

Would you like to monitor the pages whose names contain the words “American burger”? The advanced operator publicationPlace .name makes that possible!

Query:


​So your topic will collect mentions posted by any authors on the pages that contain “american burger” or “burger american” in their name.

Author based operators

☝️ Available only with Audience Insights add-on

These are author.bio, author.age, author.gender, author.subscribers, author.interests, author .interestCategories and author.occupations. These advanced operators will definitely help you to receive the desired results and gain your goals!

Let’s say you need to find the people/influencers in USA who are interested in burgers or food in general? Additionally, we will indicate that we need authors who have an audience of more than 10 000 people with the help of the author.subscribers operator:


Query:

So, this search will find all the authors in the US that have indicated “burger” as their interest, and there will be only authors whose audience is more than 10 000.

If you’d like to find food bloggers in the US, the author.occupation operator will help you with this task:

Query:

So you will easily find the food bloggers in the USA.

🎉Congratulations, you are a search query pro!

Here are some tips with a brief description of the search operators .

I wish you a successful monitoring and the most delicious burgers:)

Did this answer your question?