Advanced Keyword Query
Updated
Before You Start
To learn about Keyword Matcher Query, see What is Keyword Matcher Query?
To create a Basic Keyword Matcher Query, see How to Create a Keyword Matcher Query?
Operators for Keyword Queries
Following are some operator examples and their results:
Operator | Example | Find Messages |
| hello | Search for the term "hello". |
| social sprinklr | Search for phrases "social" and "sprinklr". |
AND | social AND sprinklr | Search for "social" and "sprinklr" anywhere within the complete message, irrespective of the keywords between them. |
OR | social OR sprinklr | Search for "social" or "sprinklr". |
NOT | "social media" NOT "facebook" | Search for results that contain "social media" but not "facebook". |
NEAR | "social media"~10 | Search for "social" and "media" within 10 words of each other. |
Note: Some other operators which are supported by Sprinklr are:
|
Syntax For Keyword Queries
Use of Parenthesis:
While parentheses are not necessary, they can be helpful for grouping operations in complex queries. For example: phone AND (Apple OR Samsung) .Use of parentheses within brackets isolates different operations.
| Tip You can also use parentheses within brackets to set off additional operations within the Advanced Query field. The end result should look similar to the result summary of a basic query, built using multiple operations within a single section. |
Parentheses nested within brackets intend to set off different operations as isolated processes. 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".
Use of Quotation marks:
Quotation marks are used for exact match phrases. Single-word queries don't require parentheses or quotation marks.
Note: Use straight quotation marks (" ") for outlining phrases, not curved marks (“ ”).
Parentheses group keywords or phrases joined by operators. Examples: "Phil Schiller" AND "Apple Marketing" "Phil Schiller" AND (Apple OR Marketing)
Punctuation within Quotation Marks: Including punctuation in quotation marks returns results with the punctuated query only. Excluding punctuation returns results for both punctuated and non-punctuated queries.
For example, "Pamela A. Wickham" will match only "Pamela A. Wickham," while "Pamela A Wickham" will match both "Pamela A Wickham" and "Pamela A. Wickham."
Constraints
Note: You cannot use a “NOT” statement within an “OR” statement. |