Build smarter queries to get the results you need

Sometimes the Keyword Query Builder just isn't enough to give you the results you need. That's why we built our Boolean operator search that allow you to create infinite combinations to provide you with the exactly the data you need.

We have some of the widest range of Boolean operators of any platform on the market, allowing you to get the most refined, accurate, useful data possible.

Our operators allow you to do everything from tracking hashtags and @mentions, to restricting by specific locations or capitalisation. They make it super easy to track even the most tricky brand names or topics. Here's how it works!

General structure

Before jumping in to the Boolean queries, we'd recommend you to read and learn the general logic for creating searches in Notified. 

The main difference between a boolean query and a keyword query is that a boolean query can contain an infinite number of "sub searches". That means you can first search for a topic or brand containing certain words or phrases and then create a new search within the search, that searches for something completely different. 

Each search string within a boolean query can contain the same elements that make up a keyword query: one or several keywords or phrases (required), a set of required combinators and a set of excluded terms. They are entered in the following order: (Keywords) AND (combinators) AND NOT (excluded). 

Single word terms can be entered without quotation marks, but phrases must be incapsulated within quotations (for example "Tesla Model S"). 

Please note that the relationship between each search query is inherently OR. 

Operators

You can use the following operators to create your search: 

  • AND - Used to define that two or more phrases must be present in the result. 
  • NEAR - Similar to AND, it defines that two or more phrases must be present in the results. But whereas using the AND operator the two phrases could be anywhere in a text post, the NEAR operator defines the maximum number of phrases that can be between the different phrases. By default it is set to a distance of maximum 10 words, but you can define this by adding NEAR/15 if you want to widen the maximum distance to 10 words. 
  • OR - Widen the search by including several possible phrases. The way this works is that at least one phrase is required, but that more than one or all can be returned. 
  • AND NOT - Narrow your search by excluding phrases. Any term entered after this operator won't be included in the search results. 
  • TITLE - Will only return results if the keyword is found within the article title. Currently only supported for news articles. Here's one example: (TITLE:“McDonalds”;) .

Query attributes

By deafult, each search query follows the general rules set in the top menu (media types, languages, “more options”). But you can overrule these rules for specific search queries. For example, if you have the general rule that the search should be in Swedish and in all mediatypes you can set for a specific search query that it for Instagram should search in global searches for that specific search query. 

You can use the following attributes: 

  • MEDIATYPES - Syntax: (MEDIATYPES: "a, b, c"; (...keywords)). Will search only in the stated mediatypes. 
  • EXCLUDEDMEDIATYPES - Syntax: (EXCLUDEDMEDIATYPES: "a, b, c"; (...keywords)) Will not search in the stated mediatypes
  • LANGUAGES - Syntax: (LANGUAGES: "a, b, c"; (...keywords)). Search only in the stated languages

Permitted values for each attribute can be found in dropdowns in the UI, as well as through the autocomplete function in the query editor.

Example search profiles

The best way to understand and learn how the boolean searches work is to see a few examples and then to give it a try yourself. We have a built-in validator that will help you enter your searches in the correct manner. 

We'll start with a simple example: 

(Tesla) AND ("model s" OR "model x" OR "model 3) AND NOT (BMW OR "Mercedes Benz")

This search query will return results that must contain Tesla and ANY of the phrases "model s" or "model x" or "model 3" but NOT BMW or Mercedes Benz. 

Here's another example where we narrow the results by exchanging the AND operator with the NEAR operator. 

(Tesla OR car) NEAR/15 ("model s" OR "model x" OR "model 3) AND NOT (BMW OR "Mercedes Benz")

As explained above this search query will return results only where the maximum distance between Tesla and ANY of the phrases "model s" or "model x" or "model 3" is maximum 15 words. 

Now you have hopefully understood how the basic structure works, but what is you want to have more than one search query? Here's how you enter it: 

(Tesla OR car) NEAR/15 ("model s" OR "model x" OR "model 3) AND NOT (BMW OR "Mercedes Benz")
("electric cars") AND (market OR predictability OR opportunities)

As you can see in the above example, to enter multiple searches simply press enter to start a new one. In the application, this is highlighted by a narrow line to make it more clear between different search queries. You can enter as many search queries you want in a search profile. 

Let's move onto query attributes. As mentioned above, this gives you the opportunity to override global search settings for a specific search query. Here's how you enter it: 

(Tesla OR car) NEAR/15 ("model s" OR "model x" OR "model 3) AND NOT (BMW OR "Mercedes Benz")
(LANGUAGES: "Swedish"; MEDIATYPES: "instagram; ("electric cars") AND (market OR predictability OR opportunities))

Let's assume that in the global search settings you have defined that you want to search across all sources and in Norwegian. What we do by adding the attributes LANGUAGES and MEDIATYPES in the above example is that we define that for the search query starting with "electric cars" we instead want to search only across Instagram and instead in Swedish. As you see, you have infinite opportunities to define each search exactly how you want. 

Summary

In Notified, you have some of the most advanced tools to create refined search profiles that can capture even the most tricky brand names or topics. Please reach out to us if you need a helping hand when setting up your search profiles!

Did this answer your question?