All Collections
Getting started
Mention Alerts
Advanced Alert Principles: Introduction to Boolean Language
Advanced Alert Principles: Introduction to Boolean Language

Review the operators that will help you build search queries

Rodrigo Araujo avatar
Written by Rodrigo Araujo
Updated over a week ago

Advanced Alerts crawl the web and social media using boolean language operators. These operators will allow you to build complex search queries that will monitor the web and social media in the methods that you prefer.

In your Advanced Alert, you will have acces to over 20+ operators that will allow you to manipulate the text and data that you want to monitor. In order to use these operators, you will need to understand how to structure your operators correctly.

In this article, we will teach fundamentals of boolean language for your advanced alerts and provide you with the general foundation of structuring your keywords correctly. Here are the topics that will be covered:


Learn How to Structure Advanced Alerts

Within the Advanced Alert, you will have three core operators that will allow you to create your keyword search and filter the data you want to monitor. These operators are AND, OR, and AND NOT.

Depending on your monitoring needs, these operators will allow you to monitor or exclude certain text and data from your alerts. The video below will provide you with insight on how to understand and use the basic operators for your alerts!

💡 In the video, you will learn how to use boolean operators for your text search. You can also use AND, OR, AND NOT for non-autonomous operators such as language, country, and source operators.


Search Query Structure

The Advanced Alert in Mention is comprised of three important elements that make up your search query:

  1. Keywords: the search words or phrases that you want to monitor online.

  2. Parenthesis: you will utilize parenthesis to group your searches in the Advanced Alert. If you are monitoring multiple topics or building complex searches, the parenthesis will make sure your alert understands your search needs.

  3. Boolean Operators: along with parenthesis, the operators will dictate how your alert will monitor data online.

Below, you will information dedicated to keywords, parenthesis, and your operators:

--

Keyword Rules

First, let's go over the keyword rules for the Advanced Alert. Keywords can contain letters, digits, underscores, and some special characters. For example, you can add a # to your keyword to monitor hashtags on social media!

Here are some examples of keywords you can use in an alert:

  • Pepsi

  • #CocaCola

  • @Sprite

When it comes to keywords, please be aware of these rules:

  • Keywords are accent-sensitive so Pepsi and Pépsî will be considered different searches.

  • Keywords are space-sensitive meaning that #CocaCola and "Coca Cola" will be considered different search terms.

  • Keywords are not case-sensitive so Sprite and sprite will be considered the same.

Quotations for Phrases

In the Advanced Alert, you will need to use quotations to monitor phrases or text with special characters.

Here are some examples of search terms that need quotations:

  • "Apple Watch"

  • "Coca-Cola"

  • "Türkiye"

  • "nasa.gov"

⚙️ Quotations will indicate to your advanced alert that you are monitoring a phrase that has spaces in-between text or that your search has a special character. With that being said, Mention will fetch content regardless of how long the spacing is.

For example, Mention will will consider "Apple Watch" and "Apple Watch" as the same.

💡 Mention Tip - URL Phrases

If you include a URL as a phrase in your alert, Mention will search for content that includes the URL as a backlink.

Example: If your alert includes "nasa.gov", then we might fetch a news article that includes a hyperlink to the NASA website.

Parenthesis Groups - Monitor Multiple Topics

In order to create an organized alert search to monitor multiple topics, you will need to use parentheses to separate your keywords and boolean operators. Parenthesis are a core function that will help your Advanced Alert understand how to monitor the web.

Here are some examples of how you can use parenthesis in your queries:

--

Multiple Searches:

A parenthesis group can divide your search query into multiple searches as seen here:

This search will tell your alert to monitor this content separately:

  • Oasis AND rover

  • NASA AND rover

--

Enclose a Search & Apply Operators

You can enclose your searches into a parenthesis group and add operators that apply to your entire search group. Take this example with the language operator:

In this example, the search we built is now enclosed with a second set of parenthesis. Outside of that group, there is a language operator that will apply to the entire group. This configuration tells the alert that you want mentions for:

  • Oasis AND rover in Spanish

  • NASA AND rover in Spanish

--

Parenthesis Groups in Operators

You can use parenthesis within certain operators to monitor multiple types of data. Here is an example using the country operator:

Within the country operator, we've aded a parenthesis group so the alert monitors for mentions of NASA from the United States and France.

AND, OR, AND NOT

The AND, OR, AND NOT operators allow you to manipulate text and data in your search queries. You can use them to combine text or apply data operators to your alerts. Let's go over each operator one more time to give you a comprehensive understanding of their function:

--

AND

The AND operator will link keywords together. We recommend using this operator when you need to create a query for specific topics.

You can also use the AND operator to link your keyword search with non-autonomous boolean operators. For example, you can use this operator when you want to add country, language, or source operators to your query.

--

OR

The OR operator will keep your keywords separate. We recommend using this operator when you are monitoring multiple topics.

You can also use the OR operator to monitor multiple data sets within specific boolean operators. For example, the OR statement will allow you to monitor multiple languages or countries in a query.

--

AND NOT

The AND NOT operator will exclude keywords or operators from your search completely. Please use this operator to omit content or data that you do not want to monitor.

---

Once you understand these writing principles, you can head over to the next section to view examples of boolean queries!

📖 If you would like to see the full list of boolean operators that you can use in your alert, please check out this article: List of Boolean Operators


Boolean Query Examples

Feel free to review the examples listed below to test your knowledge on boolean queries and writing structures. In each section, you will see a query with the answer available using the drop-down menus!

--

Example 1:

Answer

This query is monitoring two topics. It will fetch mentions when:

  • The text Mention AND social listening appears on a publication or social media post. On top of this, "mentin" is excluded from the search. If this text appears in a post, the post will be ignored.

  • The text Mention AND online monitoring appears on a publication or social media post. On top of this, "mentin" is excluded from the search. If this text appears in a post, the post will be ignored.

This alert is conducting brand monitoring because it is monitoring Mention with supplemental keywords. On top of this, the alert is excluding the word mention which might be a common misspelling of the brand's name.

--

Example 2:

Answer

This alert is conducting product monitoring on an international level by using the source_country operator which will filter data by specific countries. This query will fetch mentions when:

  • The text Lays and BLT Sandwich appear in publications or social media posts from the United States.

  • The text Lay's and BLT Sandwich appear in publications or social media posts from the United States.

  • The text Walkers and Beef and Onion appear in publications or social media posts from the United Kingdom.

  • The text Walkers and Beef & Onion appear in publications or social media posts from the United Kingdom.

For this alert, the focus is on Lay's new BLT sandwich flavor in the United States and Walker's Beef & Onion flavor in the United Kingdom. To make sure data is fetched, the alert includes variations of certain words such as Lays and Lay's to account for different spellings. We might expect mentions talking about the general perception and sentiment of these two flavors.

--

Example 3:

Answer

This alert is conducting competitive monitoring on different sources. On top of this, the alert is using parenthesis groups to apply a language filter to the entire search. This query will fetch mentions when:

  • The text Spotify and Wrapped appear on news posts in the Spanish language.

  • The text Apple Music and Replay appear on forum posts in the Spanish language.

For this alert, the focus is on Spotify Wrapped and Apple Music on specific sources and in Spanish. The alert is most likely being used to understand the general perception of these two brands and their yearly recaps.


Thank you! If you have any questions, please do not hesitate to contact [email protected].

Did this answer your question?