Criteria evaluated against field values in a field clause, structured as a tagged union where type selects the matcher type. The engine also accepts a matcher that omits type, which it reads as an equals matcher. Specifying a matcher unsupported by the target field type returns an error. See Matchers.
Example
{
"value": "fiction"
}
Types
EqualsMatchertype: "equals"
Matches field values equal to value.
valueanyrequired
The value that the field value must equal.
Example
"fiction"
InMatchertype: "in"
Matches field values equal to any value in values. An empty array matches no documents.
valuesany[]required
The values that a field value may equal.
AnyMatchertype: "any"
Matches any document that contains a value for the field.
PrefixMatchertype: "prefix"
Matches string field values starting with value, evaluated against the entire field value.
valuestringrequired
The prefix that a field value must start with.
Example
"EX-"
UnderMatchertype: "under"
Matches values at or below the specified path in a hierarchical tree. Requires a field configured with hierarchy. Path segments must match complete levels, so Men/Sho matches nothing where a prefix matcher matches.
pathstringrequired
Path in the hierarchical tree to match at or below.
Example
"Men/Shoes"
RangeMatchertype: "range"
Matches values within bounds. Accepts inclusive (gte, lte) and exclusive (gt, lt) bounds; either side may be left open, and at least one bound is required (search:matcher:range_empty).
gteany
Lower bound, the value itself included.
Example
10
gtany
Lower bound, the value itself excluded.
lteany
Upper bound, the value itself included.
ltany
Upper bound, exclusive.
Example
20
RangesMatchertype: "ranges"
Matches values falling within any of the specified range objects. An empty array matches no documents, matching the behavior of an empty in matcher.
valuesMatcherRange[]required
The ranges to evaluate, each requiring at least one bound. A bucket returned by a range facet sets from as gte and to as lt.
Example
{
"gte": 10,
"lt": 20
}
4 properties
gteany
Lower bound, the value itself included.
Example
10
gtany
Lower bound, the value itself excluded.
lteany
Upper bound, the value itself included.
ltany
Upper bound, exclusive.
Example
20
TextMatchertype: "text"
Matches text within a single field using field-level analysis.
How the parts of user text combine: all requires every word and every quoted phrase, any accepts a document that holds one of them. Excluded terms (-word) always apply. Setting join with any other match returns search:clause:join_unsupported.
Typo tolerance handling. auto follows the field's typoTolerance configuration; off disables typo tolerance for the matcher.
Default
"auto"
Values
"auto", "off"
slopinteger
Number of intervening words permitted between terms in a phrase, without changing their relative order. Only applies to phrase queries or quoted phrases in user mode.
Whether parts of user text are read as filters on the fields of the index: auto reads a number typed next to the unit of a number field, or next to a comparative word such as under, as a filter on that field; off takes every word as text. Whatever was read is reported as interpreted beside the results. See Reading numbers and units.
Default
"auto"
Values
"auto", "off"
DistanceMatchertype: "distance"
Matches geopoint values within radius meters of the specified latitude and longitude coordinates.
latnumberrequired
Latitude of the origin, in degrees.
Format
double
Range
-90 to 90
Example
59.3
lonnumberrequired
Longitude of the origin, in degrees.
Format
double
Range
-180 to 180
Example
18.1
radiusnumberrequired
Maximum distance from the origin in meters.
Format
double
Example
5000
Endpoints
Endpoints where the request or responses uses this type.