Advanced Query Builder
Updated
Within Listening, you have the option to create an advanced query which is not limited to ANY, ALL, or NONE formatting of query building. Advanced Query Builder can be used to form complex text queries which are not possible with normal query builder.
To create Advance Query
Go to the Insights icon from the left navigation pane. Now, go to the Topics window and click Add New Topic in the top right corner.
Now, go to Advance Query tab under the Setup Query section. Type your query in the Advanced Query field with the required operators and syntax. For example, you can type in search options using “OR” statements and parentheses. Click Save Topic after entering the Advance query.
You can view Conditional Operators for Advance Query as well by clicking the Conditional Operator option at the top of Enter Query.
The list of Advance Query Operators will appear on the right.
You can search for the specific operator in the search bar.
Operators for Topic Queries
Following are some operator examples and their results:
Some other operators which are supported by Sprinklr are:
Proximity - It is used to define proximity or distance between 2 keywords only, whereas, Near can be used to define proximity between two keywords as well as keyword lists. For more information, see Apply Proximity Settings in Keywords.
Onear (Ordered Near) - It sets the order in which the keywords will appear. For example: Keyword-List1 ONEAR Keyword-List2 will ensure keywords from Keyword-List1 appear first and then Keyword-List2 keywords will follow.
Syntax for Topic Queries
Use of Parenthesis:
Parentheses are not necessary to enclose a search query but can be useful while grouping operations together for more complex queries.
For example, if you want to return results that mention Samsung or Apple phones, and also want to query content that mentions phones along with either Apple or Samsung, you could use parentheses around Apple and Samsung to group three keywords together, as shown below.
phone AND (Apple OR Samsung)
Use of parenthesis within brackets, is further explained below with an example:
[(internet of things ~3) OR iot OR internetofthings) AND (robots OR robot OR #robot)] NOT [things]
As a part of the rest of the query, this will perform the following operations:
Search for posts that contain the phrase "internet of things" or "#internetofthings"
From within those results, keep any result that also says "robots" or "robot" or "#robot" within three words (a proximity search) of either "internet of things" or "iot" or "internetofthings".
Discard any results that just have the phrase "things" within.
Parentheses nested within brackets intend to set off different operations as isolated processes. In the previous example, if you build an Advanced Query that states [(internet of things OR iot OR internet of things) AND (robots OR robot OR #robot)] your query will return results that contain ANY of the first three terms and the second three terms.
However, if you build an Advanced Query that states [internet of things OR iot OR internet of things AND robots OR robot OR #robot], your query will return any result that contains the phrase "internet of things" or the word "iot" or the word "robot" or the hashtag #robot or specifically the phrase "internet of things" within the same message as the word "robots".