Search Operators | Yext Hitchhikers Platform

Search operators allow users to control the logic for how tokens are combined when performing keyword search. The four operators made available by this feature are AND, OR, NOT and double quotes. These operators can be used individually or combined to apply more complex logic to the tokens included in a keyword search.

Configuration

Currently, this feature can only be enabled via the JSON editor. To enable Search operators in an experience, add the following as a top-level property to your Search configuration:

"useSearchOperators": true

Operations Reference

General Usage

Operators are case sensitive and typo-intolerant. For example, searching “red and dog” would still return results with the tokens “red” or “dog”. The query “red AND dog” properly makes use of the AND operator, and therefore would ensure only results with both tokens are returned.

AND

Putting AND between two tokens in a query will require that both tokens appear in one of the searchable fields for that entity.

For example, the query “yext AND search” will only return results that contain both the tokens “yext” and “search”. The query “yext AND knowledge AND graph” will only return results that match with all of “yext”, “knowledge”, and “graph”.

OR

Putting OR between two tokens in a query will require that either (not all) of the tokens appear in one of the searchable fields for that entity.

NOT

Putting NOT before a token in a query will require that the token does not appear in any of the searchable fields for that entity.

Double Quotes

Putting double quotes around a phrase in a query will require that the entire phrase appears in one of the searchable fields for that entity.