Proximity Operators

fish NEAR3 chips
Matches "fish and chips" and "chips and freshly caught fish", but not "fish is sometimes battered and fried, and served with chips".

DNEARN

The terms must occur within N words of each other, in the specified order.

fish DNEAR3 chips
Matches "fish and chips" and "fish and fresh cut chips", but not "chips and fish".

BEFORE

Both terms must occur, and the first term must occur earlier in the document than the second term.

cat BEFORE nap

AFTER

Both terms must occur, and the first term must occur later in the document than the second term.

Labrador AFTER Canada

Note: Proximity matches do not count stop words. For example, fish DNEAR1 chips matches both "fish chips" and "fish and chips", because and is a stop word.

Brackets

You can use parentheses () to define the order in which to apply Boolean and proximity operators. The API evaluates the expression inside the brackets first, and then the expression outside the brackets.

For example:

(fish OR pie) AND (chips OR mash)

Matches documents that contain any of the following term combinations:

fish chips

fish mash

pie chips

pie mash

fish pie chips

fish pie mash

fish chips mash

pie chips mash

fish pie chips mash

Field Restrictions

You can specify field restrictions for text queries to specify that the query text must occur in a specified Index field (see Index Field Types). For example, you might want to return results where your query term occurs in the title, rather than in the body of the text. To specify that a query term must occur in a specific field, use the following syntax:

QueryTerm:FieldName

For example:

Football:title

This specifies that the term Football must occur in the title field of a result.

You can specify multiple fields by separating them with colons. For example:

Football:title:wikipedia_alias

This specifies that the term Football must occur in the title or wikipedia_alias field of a result.

For information about the fields available in the Haven OnDemand public data sets, see Public Data Sets.

Haven OnDemand uses cookies to enhance and improve the experience it provides. By continuing to use this site or pressing Continue,
we will assume that you accept receiving all cookies. If you would like to change which cookies are set, you can change your settings.