A few tips for setting up complex searches

Most of the queries (or searches) you will be using in alerts or widgets will contain multiple words and search operators. Here is a list of definitions and rules that Cuesense supports.

A query contains several terms and phrases, combined via search operators.

A single word, e.g. Madrid
Multiple words that have to appear together in text. Use quotes, e.g. “san francisco”

Combining terms and phrases
By default, when you type multiple terms or phrases in a query, they are all required. In other words, the default operator is an ‘AND’. You can also type AND explicitly in the query, but it will be removed when saving.

Here is what Cuesense will find when you use the following search operators:

  • No operators (default)

E.g. hotel argonaut “san francisco”
Sentiment must contain all specified terms and phrases: hotel, argonaut, and “san francisco”

  • OR operator

E.g. “san francisco” OR SF
Sentiment must contain either “san francisco” or SF

  • + operator

E.g. +hotel +argonaut
Sentiment must contain all terms. Same as AND. The + operator is allowed when specifying the query, but will be removed when saving the query

  • - operator

E.g. argonaut -bar
Sentiment must contain “argonaut” but exclude the term¬† “bar”

A couple of additional hints regarding the precedence of operators and using () brackets.
When the OR operator and the default combination (no operator) are used simultaneously in a query, the OR operator will be evaluated first. For example, if you type

hilton “san francisco” OR SF

Cuesense will find sentiments containing the term ‘hilton’ and either of the two phrases joined by the OR. Both ‘I checked into Hilton San Francisco’ and ‘Staying at the SF Hilton’ will pass the test, while ‘I really love visiting SF’ will not.

Brackets play largely a cosmetic role, allowing you to divide the query into parts that are easier to read. They are ignored by Cuesense when searching for text.


No comments yet.

Leave a Reply