Advanced Query Language & Search Shortcuts
With query language, you can get the most useful results by telling us what you really need to see.
It helps you cut through some of the noisy data, to give you tailored search results.
1) Common Operations
andsignifies AND operation
orsignifies OR operation
notnegates a single keyword
"wraps a number of keywords to signify a phrase for searching
*is a wildcard operator (see below) - used for partial matches
apples and oranges and -pears
(give me all documents mentioning "apples" and "oranges" but not "pears")
(apples or oranges) -pears (apples or oranges) not pears
(give me all documents which have words "apples", "oranges" or don't contain "pears")
(apples or oranges) and -pears
(give me all documents which have words "apples" or "oranges" but they don't contain word "pears")
Query like this:
"apples and oranges" and -pears
will find only documents with phrase "apples and oranges" but not mentioning "pears".
-"apples and oranges" and pears
will find documents which don't include phrase "apples and oranges" and have the word "pears"
is not the same as
To be more specific: 'trial account' is the same as trial or account. Similarly "trial account" is the same as trial and account.
gives us all documents which have words like
apples or oranges
This is important because when combined with - operator (negation) the results will be quite different:
which means "apples or not oranges", where you probably mean:
apples and -oranges
which means "apples and not oranges"
2) Filter Terms
Is correct, but
is not. The search might work but will be same as searching for source: or intercom
User property filters
User properties can come in different types - numbers, dates and text. Each uses different syntax:
user:email:firstname.lastname@example.org - find feedback from user with email
user:company.number_of_users:[10 to 100] - find feedback from all users in companies with number of users between 10 and 100
user:"signed up":[now-7d to now] - find all feedback from users who signed up in last 7 days.
user:email:*@example* - will find all documents from users who's email address has example domain ("email@example.com" "firstname.lastname@example.org" or "email@example.com")
* operator means 'match anything' - it can be used for:
partial matches in a word:
appl*- will match all words starting with appl
*appl*- will match all words with appl inside
presence of a term:
tag:ba*- will find documents with any tag starting with "ba"
user:number_of_bikes:*- will find all documents for which users have any number of bikes
Combining queries and useful shortcuts
Sometimes you want to find all unprocessed feedback - recently added documents with no tags or themes. This query will help:
added:[now-7d to now] and not has:tags and not has:themes
which finds all documents which:
- have been added in last 7 days
- have no tags
- have no themes
Queries can also support variants:
(source:intercom and added:[now-30d to now]) or (source:zendesk and created:[now-7d to now])
Will find either:
- documents from Intercom added in last 30 days
- or documents from Zendesk created last week
Query language is fully supported in Rules and Highlight's search.