About Boolean searches

For Boolean searches, Studio displays a Boolean Search panel when you include a logical operator in the query. Selecting the Boolean Search link from the panel runs the search based on the operators listed below.


The Boolean Search panel.
Note: Boolean Search results may not display in all data sets. For results to be available, at least one attribute in the data must have String values that are larger than 200 characters on average, or else one or more attributes must be manually enabled for full text search through the Transform page of a project.
Boolean Search Operator Purpose Example Usage and Results
AND Returns results with all specified terms.
fruit AND berry
Returns results with both "fruit" and "berry" such as:
This wine has notes of fruit, cinnamon,
berry, and oak.
OR Returns results with any specified terms.
"best buy" OR cheap
Returns results with either "best buy" or "cheap" such as:
The product quality is cheap.
NOT Negates the following term. Carries an implicit "AND" when paired with other terms, which is overridden if you specify "OR NOT"
"best buy" NOT cheap
Returns results with "best buy" but not "cheap" such as:
At this price, this is a best buy.
But not:
The price is cheap for what you get, a definite best buy.
NEAR/<NUM> Returns results where the right side term is within <NUM> words of the left side term. Terms can be a single word or multi-word phrases, but cannot include wildcards or Boolean operators.
blue NEAR/4 red
Returns results where "blue" is within 4 words (inclusive) of "red", such as:
red orange yellow green blue indigo violet
ONEAR/<NUM> Functions identically to NEAR/<NUM> , except that terms must be in the specified order.
red ONEAR/2 blue
Returns results where "blue" occurs within 2 words AFTER "red", such as:
red white blue

Operator interaction and precedence

By default, a keyword search runs as an AND search that uses all entered terms. You can use Boolean operators to set more precise search logic. For example, the query camcorder AND NOT digital searches for records with the word "camcorder" and then removes any results with the word "digital" before returning the set of matches.

Operator precedence is determined in the following order:
  1. Any sub-expressions in parentheses are evaluated first
  2. NOT is evaluated before other operators
  3. AND is evaluated after NOT
  4. OR is evaluated after AND

For example, the expression "A OR B AND C NOT D" is interpreted as "A OR (B AND C AND (NOT D))".