Reads user text as filters on the named targets only. A number typed with a unit is read on every target declaring that unit; a number typed without one is read on every target holding a currency, when they all hold the same currency.
Clauses that must hold where the number is read: in the same value as the field for a field inside a nested list, and for the document otherwise. Takes what a nested clause takes: field, text, and, or, not and boost. A clause naming a field outside the list returns search:nested:field_not_inside.
Example
{
"field": "category",
"match": {
"value": "fiction"
}
}
9 types
FieldClausetype: "field"
Matches documents by the value of a single field. The targeted field must be indexed for the requested matcher usage; if it is not configured for that usage, the request returns search:usage_unsupported.
Matches field values equal to any value in values. An empty array matches no documents.
Example
{
"type": "in",
"values": [
"fiction",
"poetry"
]
}
valuesany[]required
The values that a field value may equal.
AnyMatchertype: "any"
Matches any document that contains a value for the field.
Example
{
"type": "any"
}
PrefixMatchertype: "prefix"
Matches string field values starting with value, evaluated against the entire field value.
Example
{
"type": "prefix",
"value": "EX-"
}
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.
Example
{
"type": "under",
"path": "Men/Shoes"
}
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).
Example
{
"type": "range",
"gte": 10,
"lt": 20
}
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.
Example
{
"type": "ranges",
"values": [
{
"gte": 10,
"lt": 20
},
{
"gte": 50
}
]
}
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
}
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.
Matches query text across one or more fields. Phrase queries operate within a single field and match terms exactly as typed, regardless of field typoTolerance. Fields defined only for autocomplete do not support phrase matching. See text.
Example
{
"type": "text",
"text": "silent spr",
"fields": {
"name": 3,
"description": null
}
}
textstringrequired
The query text to match.
Example
"silent spr"
fieldsmap of number
Object mapping field names to score weights. A field mapped to null uses the weight from its field definition. If omitted, searches all searchable fields, skipping autocomplete-only fields.
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, and a filter read out of the text is one of the parts. Setting join with any other match returns search:clause:join_unsupported. See Reading what was typed.
Typo tolerance handling. auto follows each field's typoTolerance configuration; off disables typo tolerance for the clause.
Default
"auto"
Values
"auto", "off"
slopinteger
Number of intervening words permitted between terms in a phrase, without changing their relative order. Setting slop above 0 with "match": "all" or "match": "any" returns search:clause:slop_unsupported.
Scope for multi-field term matching. term evaluates each term across all targeted fields, so terms may appear in different fields; field requires a single field to satisfy match on its own. Ignored by phrase queries.
Whether parts of user text are read as filters on the fields of the index, given as a mode or as the targets to read on. See Reading numbers and units.
Whether parts of user text are read as filters: auto reads a number typed next to a unit or a comparative word as a filter on the field declaring that unit, off takes every word as text.
Reads user text as filters on the named targets only. A number typed with a unit is read on every target declaring that unit; a number typed without one is read on every target holding a currency, when they all hold the same currency.
Matches the k nearest documents by vector distance in a specified field, scored by proximity. Cannot be combined with hits (search:hits:knn_unsupported).
Example
{
"type": "knn",
"field": "embedding",
"vector": [
0.1,
0.2
],
"k": 10,
"filter": [
{
"field": "published",
"match": {
"value": true
}
}
]
}
fieldstringrequired
The vector field to search.
Example
"embedding"
vectornumber[]required
The query vector. Its length must match the dimensions declared in the field definition.
Format
float
kintegerrequired
Number of nearest documents to return, at most EXOFIND_SEARCH_MAX_KNN_K.
Matches documents where a single element of a nestedobject field satisfies all child clauses. A nested clause on a flattened object field returns search:nested:path_not_nested; on a non-object field it returns an error. See nested.
Clauses evaluated within a single nested object value, naming fields by their dotted path. An empty array matches any document where the object field is present. May contain field, text, knn, and, or, not and boost; a clause that only means something for whole documents, such as another nested or a fuse, returns search:nested:clause_unsupported.
Example
{
"field": "category",
"match": {
"value": "fiction"
}
}
scoreScore
Scoring mode for aggregating matching nested values. Only applies when scoring clauses exist within the nested clause.
Increases the relevance score of documents that satisfy child clauses without excluding non-matching documents.
Example
{
"type": "boost",
"weight": 2,
"clauses": [
{
"field": "featured",
"match": {
"value": true
}
}
]
}
weightnumberrequired
Multiplier applied to matching documents. Values greater than 1 increase score; values between 0 and 1 decrease score. Leaving it out, or setting it below 0 or to a non-finite number, returns search:clause:weight_out_of_range.
Matches documents across several rankings, scored and merged by rank. Documents are scored by the sum of weight / (rankConstant + rank) across the rankings that reached them. Because the clause reads only result positions, scores from different scales (such as BM25 text relevance and vector similarity) combine without normalization. Matches at most depth results per ranking. See fuse.
Clauses the ranking searches for, combined with an implicit AND. At least one clause is required.
Example
{
"field": "category",
"match": {
"value": "fiction"
}
}
weightnumber
Multiplier that scales the ranking's contribution relative to other rankings. It cannot reorder results within the ranking.
Default
1
Format
float
depthinteger
Number of results read from each ranking. Pagination cannot exceed the merged list, similar to k in a knn clause. Must be at least 1, and at most EXOFIND_SEARCH_MAX_FUSE_DEPTH.
Default
100
Format
int32
rankConstantnumber
Constant added to each rank before it is inverted. Lower values increase the weight of the highest-ranked results in each ranking; higher values flatten the difference across ranks, giving more weight to documents found by multiple rankings. Must be above 0.
Clauses that narrow every ranking before it is cut to depth. A knn clause inside a ranking applies filter entries as a pre-filter, ensuring the vector ranking returns k results. Clauses placed beside the fuse clause filter the merged list after each ranking is cut to depth.
Targets read instead, in order, where the document holds no value on this one - a product with no price on the customer's list is read on the store's list. Every target of the chain must declare the same unit; one in another unit returns search:interpret:fallback_unit_mismatch.
Example
{
"field": "prices.amount",
"when": [
{
"field": "prices.list",
"match": {
"value": "customer"
}
}
],
"fallback": [
{
"field": "prices.amount",
"when": [
{
"field": "prices.list",
"match": {
"value": "store"
}
}
]
}
]
}
Endpoints
Endpoints where the request or responses uses this type.