Boolean Query

Updated 

In Sprinklr, Boolean operators can be used with keywords to create a research query that will help you fetch all the relevant mentions and conversations around any topic or brand. 

What are Boolean operators?

Boolean operators are used to connect search terms for creating a logical phrase. Using them, you can create a complex search query that may include multiple concepts and alternative keywords. The Boolean Operators include OR, AND, and NOT. Besides Boolean operators, you can also use advanced operators (or search operators) in your research query.

Difference between OR, AND, & NOT Operators 

Before you can learn how to use Boolean operators, let’s understand the difference between the OR, AND, and NOT operators:

  • OR directs the platform to fetch mentions containing any one of the given lists of keywords in the OR box.

  • AND directs the platform to fetch mentions compulsorily containing the given list of keywords in the AND box.

  • NOT directs the platform to exclude the mentions containing the keywords given in this box.

How to use Boolean Operators?

OR

AND

NOT

It helps you search for content where any of the keywords are present in the message

It helps you search for content where all the keywords are included in the message

It helps you exclude keywords that you do not want to fetch in your search results

Example: Social OR Sprinklr

Example: Social AND Sprinklr

Example: "Social" NOT "Marketing"

Result: Search for messages that contain either "Social" or "Sprinklr" or both in the message body.

 

Note: OR should be used in CAPS.

Result: Search for messages that contain both the keywords "Social" and "Sprinklr" in the message body. 

Note: AND should be used in CAPS.

Result: Search for messages that contain the keyword "Social" but do not contain the keyword "Marketing".

Note: NOT should be used in CAPS.

Using AND and OR together

In case you need any one keyword from the AND list along with any one of the multiple keywords in the OR list, we recommend an advanced Research Query. 

  • To further clarify, if the query contains: ((X OR Y) AND ( A OR B)), then only the following mentions would be fetched:
    AX, AY, AXY, BX BY, BXY, ABX, ABY, ABXY  

In the same way, this can be clubbed with the NOT function.