Suggest what to search for
Answers what to search for, from the text typed into a search box so far. A search box asks for this on every keystroke, and shows the answer as a list to pick from.
The suggestions are the values of the fields the search settings of the index opt in with suggest (see Field settings), that start with the text, each with how many documents hold it under the given filters. An index whose settings suggest no field answers an empty list. Each suggestion says how many characters of it were typed, so a search box can mark the part that completes the text.
Matching rules:
- Folding: The text and the values of a field are compared folded in case and Unicode form, by the
normalizestep of the field'sautocompleteanalyzer chain, or of the chain the engine builds forautocompletewhen the field declares none.röfindsRöd. Words are not stemmed, soshoesdoes not findShoe. - Declared labels: The text is also compared with the label the search settings declare for a value in the locale of the request, so
rösuggests the valueredlabelledRödin Swedish. A declared value no document holds is never suggested. - Whole-value prefix: The comparison is against the start of the whole value, not of each word:
airdoes not findNike Air Max. - Ordering: The most common values first; ties by field name, then by value.
- Typo tolerance: When fewer values than
limitstart with a text of at least five characters andtyposisauto, values one mistake away from the text - a character inserted, dropped, replaced, or two adjacent ones swapped - are suggested after them, markedcorrected, withtypedat0. The first character of the text is never read as a mistake. - Counts: The counts are the ones a facet of a search under the same filters answers. A filter on a suggested field is left out of that field's own counts, so a brand already ticked keeps the other brands suggestable.
A filter panel that completes the values of one facet uses POST /v1alpha1/indexes/{name}/facets/{field}/values instead. See Suggesting what to search for.
Path parameters
namestringrequired@ and the name of the generation, such as books@2.Headers
X-Exofind-Freshnessanyfreshness.atLeast is read when both are given.Body
Asks what to search for, from the text typed so far. The suggestions are the values of the fields the search settings of the index opt in with suggest, that start with the text, the most common first. All properties are optional; an empty request answers the most common values.
textstringrö finds Röd and air does not find Nike Air Max, and with the labels the search settings declare for the values in the locale of the request. If omitted or blank, the most common values are answered with typed at 0."adi"localestring"sv"filtersClause[]filters of a search, such as the category a search box is scoped to. The counts are the ones a facet of a search under the same filters answers. A filter on a suggested field is left out of that field's own counts, so a brand already ticked keeps the other brands suggestable (see Facets). The clauses count against EXOFIND_SEARCH_MAX_CLAUSES and EXOFIND_SEARCH_MAX_CLAUSE_DEPTH, as for a search.Example
{ "field": "category", "match": { "value": "fiction" }}9 types
FieldClausetype: "field"search:usage_unsupported.Example
{ "field": "category", "match": { "value": "fiction" }}fieldstringrequired"category"Example
{ "value": "fiction"}9 types
EqualsMatchertype: "equals"value.Example
{ "value": "fiction"}valueanyrequired"fiction"InMatchertype: "in"values. An empty array matches no documents.Example
{ "type": "in", "values": [ "fiction", "poetry" ]}valuesany[]requiredAnyMatchertype: "any"Example
{ "type": "any"}PrefixMatchertype: "prefix"value, evaluated against the entire field value.Example
{ "type": "prefix", "value": "EX-"}valuestringrequired"EX-"UnderMatchertype: "under"hierarchy. Path segments must match complete levels, so Men/Sho matches nothing where a prefix matcher matches.Example
{ "type": "under", "path": "Men/Shoes"}pathstringrequired"Men/Shoes"RangeMatchertype: "range"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}gteany10gtanylteanyltany20RangesMatchertype: "ranges"in matcher.Example
{ "type": "ranges", "values": [ { "gte": 10, "lt": 20 }, { "gte": 50 } ]}valuesMatcherRange[]requiredfrom as gte and to as lt.Example
{ "gte": 10, "lt": 20}4 properties
gteany10gtanylteanyltany20TextMatchertype: "text"Example
{ "type": "text", "text": "silent spring", "match": "phrase"}textstringrequiredmatchMatchphrase requires terms to appear in exact order and adjacent; user parses search syntax such as quotes and negation.- Default
- "all"
- Values
- "all", "any", "phrase", "user"
joinJoinuser 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.- Default
- "all"
- Values
- "all", "any"
prefixPrefixlast_token matches the trailing word as a prefix; off requires an exact word match.- Default
- "last_token"
- Values
- "last_token", "off"
typosTyposModeauto follows the field's typoTolerance configuration; off disables typo tolerance for the matcher.- Default
- "auto"
- Values
- "auto", "off"
slopintegerphrase queries or quoted phrases in user mode.- Default
- 0
- Format
- int32
relaxRelax- Default
- "unmatched"
- Values
- "off", "unmatched", "words"
interpretInterpretModeuser 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"radius meters of the specified latitude and longitude coordinates.Example
{ "type": "distance", "lat": 59.3, "lon": 18.1, "radius": 5000}latnumberrequired- Format
- double
- Range
- -90 to 90
59.3lonnumberrequired- Format
- double
- Range
- -180 to 180
18.1radiusnumberrequired- Format
- double
5000"text"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"silent spr"fieldsmap of numbernull uses the weight from its field definition. If omitted, searches all searchable fields, skipping autocomplete-only fields.1 property
<key>number- Format
- float
matchMatchphrase requires terms to appear in exact order and adjacent; user parses search syntax such as quotes and negation.- Default
- "all"
- Values
- "all", "any", "phrase", "user"
joinJoinuser 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.- Default
- "all"
- Values
- "all", "any"
prefixPrefixlast_token matches the trailing word as a prefix; off requires an exact word match.- Default
- "last_token"
- Values
- "last_token", "off"
typosTyposModeauto follows each field's typoTolerance configuration; off disables typo tolerance for the clause.- Default
- "auto"
- Values
- "auto", "off"
slopintegerslop above 0 with "match": "all" or "match": "any" returns search:clause:slop_unsupported.- Default
- 0
- Format
- int32
relaxRelax- Default
- "unmatched"
- Values
- "off", "unmatched", "words"
combineCombineterm 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.- Default
- "term"
- Values
- "term", "field"
interpretInterpretuser 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.- Default
- "auto"
2 types
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.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.Example
{ "fields": [ { "field": "prices.amount" } ]}Example
{ "field": "prices.amount", "when": [ { "field": "prices.list", "match": { "value": "customer" } } ], "fallback": [ { "field": "prices.amount", "when": [ { "field": "prices.list", "match": { "value": "store" } } ] } ]}3 properties
fieldstringrequired"prices.amount"whenClause[]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" }}fallbackInterpretTarget[]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" } } ] } ]}"knn"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"embedding"vectornumber[]required- Format
- float
kintegerrequiredEXOFIND_SEARCH_MAX_KNN_K.- Format
- int32
filterClause[]Example
{ "field": "category", "match": { "value": "fiction" }}"nested"nested object 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.Example
{ "type": "nested", "path": "variants", "clauses": [ { "field": "variants.color", "match": { "value": "red" } }, { "field": "variants.price", "match": { "type": "range", "lt": 20 } } ]}pathstringrequired"variants"clausesClause[]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- Default
- "max"
- Values
- "max", "min", "avg", "total"
"and"Example
{ "type": "and", "clauses": [ { "field": "category", "match": { "value": "fiction" } }, { "field": "published", "match": { "value": true } } ]}Example
{ "field": "category", "match": { "value": "fiction" }}"or"Example
{ "type": "or", "clauses": [ { "field": "category", "match": { "value": "fiction" } }, { "field": "category", "match": { "value": "poetry" } } ]}Example
{ "field": "category", "match": { "value": "fiction" }}"not"Example
{ "type": "not", "clauses": [ { "field": "discontinued", "match": { "value": true } } ]}Example
{ "field": "category", "match": { "value": "fiction" }}"boost"Example
{ "type": "boost", "weight": 2, "clauses": [ { "field": "featured", "match": { "value": true } } ]}weightnumberrequired1 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.- Format
- float
2Example
{ "field": "category", "match": { "value": "fiction" }}"fuse"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.Example
{ "type": "fuse", "depth": 200, "rankConstant": 60, "rankings": [ { "clauses": [ { "type": "text", "text": "waterproof jacket", "fields": { "name": null } } ] }, { "clauses": [ { "type": "knn", "field": "embedding", "vector": [ 0.1, 0.2 ], "k": 200 } ], "weight": 0.5 } ], "filter": [ { "field": "inStock", "match": { "value": true } } ]}search:clause:rankings_too_few.Example
{ "clauses": [ { "type": "text", "text": "waterproof jacket", "fields": { "name": null } } ], "weight": 0.5}2 properties
AND. At least one clause is required.Example
{ "field": "category", "match": { "value": "fiction" }}weightnumber- Default
- 1
- Format
- float
depthintegerk in a knn clause. Must be at least 1, and at most EXOFIND_SEARCH_MAX_FUSE_DEPTH.- Default
- 100
- Format
- int32
rankConstantnumber0.- Default
- 60
- Format
- float
filterClause[]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.Example
{ "field": "category", "match": { "value": "fiction" }}limitintegerEXOFIND_SUGGEST_MAX_LIMIT.- Default
- 5
- Format
- int32
- Range
- 1 or more
typosSuggestTyposlimit start with it. auto suggests them after the values the text starts, once the text is at least five characters long; a mistake is a character inserted, dropped, replaced, or two adjacent ones swapped, never in the first character. Such a suggestion carries corrected: true and typed: 0. off never suggests them.- Default
- "auto"
- Values
- "auto", "off"
freshnessFreshness1 property
atLeaststringfreshness property or X-Exofind-Freshness header. The node answers only once it holds the state the token describes: the generation, the commit and the search settings. A node that is behind commits, pulls or reads the settings first, and answers search:freshness:unavailable with a Retry-After header when it has waited EXOFIND_SEARCH_FRESHNESS_WAIT without reaching the state. The token is opaque; pass it back unchanged."AQoIcHJvZHVjdHMSATIYBw"Responses
SuggestResponse
The suggestions for the typed text, the most common first, with every suggestion the text starts before the ones found a mistake away.
suggestionsSuggestion[]Example
{ "text": "adidas", "typed": 3, "field": "brand", "value": "adidas", "label": "Adidas", "count": 87}7 properties
textstringtyped says something true. Sending it as the text of a search finds the value, and a corrected suggestion finds it exactly."adidas"typedintegertext the typed text covers, so the part typed can be marked apart from the part that completes it. Counted on text as answered, not on what was typed, so RÖ typed against Röd covers 2. 0 when the suggestion was found a mistake away, and for a blank text.- Format
- int32
3correctedbooleantrue when the suggestion was found one mistake away from the text instead of starting with it. Omitted otherwise.fieldstringfield clause filtering on the value names."brand"valueany"adidas"labelstring"Adidas"countinteger- Format
- int64
87generationstring@ and this name to the index name to send a later request to the same data. See Names and generations."2"freshnessstringfreshness.atLeast on a later request, and that request is answered from this state or a later one whichever node it lands on. Opaque; pass it back unchanged. See Freshness."AQoIcHJvZHVjdHMSATIYBw"tookMsnumber- Format
- double
0.412ErrorResponse
The body of every failed request. Error codes use colon-separated namespaces such as index:field:name_invalid, are stable across API versions, and are never renamed or reused, so clients match on code rather than on message. See Errors.
codestringvalidation and the individual problems are listed in errors. For all other failures, this matches the code of the single entry in errors."validation"messagestringcode rather than on message. When a validation failure contains one problem, this is that problem's message. When it contains several, it reads Request contains N errors."Request contains 2 errors"errorsErrorDetail[]Example
{ "code": "index:field:primary_key:multiple_unsupported", "message": "Field `id` is marked as a primary key and multiple, primary keys can not have multiple values", "path": "id"}4 properties
codestring"index:field:primary_key:multiple_unsupported"messagestring"Field `id` is marked as a primary key and multiple, primary keys can not have multiple values"pathstringfields.title or documents[1].nonexistent. Names join with ., one element of a list reads [n] counted from zero, and a key of a free-form map such as metadata goes in brackets and double quotes when it holds a dot or a bracket, as metadata["build.sha"]. A field inside an object field carries its own dotted path, so a path here reaches a field the same way a query does. Omitted when the problem applies to the request as a whole. See API conventions."id"argumentsmap of string1 property
<key>stringError codes
- search:suggest:limit_out_of_range
- `limit` is below 1 or above `EXOFIND_SUGGEST_MAX_LIMIT`. The `max` argument carries the cap.
- request:value_required
- A part of the request that needs a value carries none. The `path` names it.
- search:clause:field_required
- A `field` clause does not name the field to match.
- search:clause:match_required
- A `field` clause does not say what to look for in the field.
- search:clause:text_required
- A `text` clause carries no text to search for.
- search:clause:path_required
- A `nested` clause does not name the object field to match inside.
- search:clause:vector_required
- A `knn` clause carries no vector to find the neighbours of.
- search:clause:k_out_of_range
- The `k` of a `knn` clause is missing, below one, or above `EXOFIND_SEARCH_MAX_KNN_K`.
- search:clause:weight_out_of_range
- The `weight` of a `boost` clause is missing, below zero or not a finite number.
- search:clause:slop_out_of_range
- The `slop` of a `text` clause is below zero.
- search:clause:slop_unsupported
- A `text` clause sets `slop` without matching as a phrase. Set `match` to `phrase`, or to `user`.
- search:clause:join_unsupported
- A `text` clause sets `join` without matching what somebody typed. Set `match` to `user`, or say `all` or `any` in `match` itself.
- search:clause:rankings_too_few
- A `fuse` clause holds fewer than two rankings to fuse.
- search:clause:ranking_empty
- A ranking of a `fuse` clause holds nothing to rank by.
- search:clause:rank_constant_out_of_range
- The `rankConstant` of a `fuse` clause is not a number above zero.
- search:clause:depth_out_of_range
- The `depth` of a `fuse` clause is below one result, or above `EXOFIND_SEARCH_MAX_FUSE_DEPTH`.
- search:clause:interpret_fields_required
- The `interpret` of a `text` clause names no target field. Name at least one, or use `auto` or `off`.
- search:clause:interpret_when_unsupported
- The `when` of an `interpret` target holds a `nested`, `knn` or `fuse` clause.
- search:matcher:value_required
- A matcher carries no value to look for.
- search:matcher:range_empty
- A range matcher carries no bound.
- search:matcher:range_conflicting
- A range matcher combines `gte` with `gt`, or `lte` with `lt`.
- search:matcher:origin_required
- A distance matcher carries no `lat` and `lon` to measure from.
- search:matcher:radius_required
- A distance matcher does not say how far from the origin values may be.
- search:filter:clause_unsupported
- A clause under `filters` is neither a `field` nor a `nested` clause.
- search:locale_unsupported
- The request names a locale the node has no rules for.
- search:field_unknown
- A filter names a field the index does not have.
- search:filter:scoring_unsupported
- A clause under `filter` affects the score. Move it out of `filter`.
- search:clauses_too_many
- The filter holds more clauses than the node allows.
- search:clauses_too_deep
- The filter nests deeper than the node allows.
- search:usage_unsupported
- A clause, sort or facet uses a field in a way the definition does not enable for it.
- search:value_invalid
- A matcher is given a value of the wrong kind for the type of its field.
- search:matcher:type_unsupported
- A matcher is used on a field whose type cannot answer it.
- search:no_searchable_fields
- A text clause names no fields and the index has none defined for matching.
- search:nested:path_not_nested
- A `nested` clause names a path whose values are flattened.
- search:nested:field_not_inside
- A clause inside a `nested` clause names a field outside its path.
- search:nested:field_outside
- A clause outside a `nested` clause names a field inside a nested list.
- search:nested:clause_unsupported
- A `nested` clause holds a clause that cannot run against a single value, such as `fuse`.
- search:interpret:unit_required
- An `interpret` target names a field that is not a number field or declares no `unit`.
- search:interpret:fallback_unit_mismatch
- A `fallback` target declares another unit than the target it stands in for.
- search:clause:k_required
- A `knn` clause carries no `k`.
- search:freshness:invalid
- The freshness token is not one the engine issued. Pass a token back unchanged.
- search:freshness:version_unsupported
- The freshness token was issued in a format version this node does not read. The `version` argument carries it; send the request to a node of the release that issued the token.
- search:freshness:index_mismatch
- The freshness token is of another index than the one in the path. The `index` argument carries the index the token is of.
WWW-Authenticate: Bearer.ErrorResponse
The body of every failed request. Error codes use colon-separated namespaces such as index:field:name_invalid, are stable across API versions, and are never renamed or reused, so clients match on code rather than on message. See Errors.
codestringvalidation and the individual problems are listed in errors. For all other failures, this matches the code of the single entry in errors."validation"messagestringcode rather than on message. When a validation failure contains one problem, this is that problem's message. When it contains several, it reads Request contains N errors."Request contains 2 errors"errorsErrorDetail[]Example
{ "code": "index:field:primary_key:multiple_unsupported", "message": "Field `id` is marked as a primary key and multiple, primary keys can not have multiple values", "path": "id"}4 properties
codestring"index:field:primary_key:multiple_unsupported"messagestring"Field `id` is marked as a primary key and multiple, primary keys can not have multiple values"pathstringfields.title or documents[1].nonexistent. Names join with ., one element of a list reads [n] counted from zero, and a key of a free-form map such as metadata goes in brackets and double quotes when it holds a dot or a bracket, as metadata["build.sha"]. A field inside an object field carries its own dotted path, so a path here reaches a field the same way a query does. Omitted when the problem applies to the request as a whole. See API conventions."id"argumentsmap of string1 property
<key>stringError codes
- auth:unauthenticated
- The request carries no credential this node accepts.
search permission.ErrorResponse
The body of every failed request. Error codes use colon-separated namespaces such as index:field:name_invalid, are stable across API versions, and are never renamed or reused, so clients match on code rather than on message. See Errors.
codestringvalidation and the individual problems are listed in errors. For all other failures, this matches the code of the single entry in errors."validation"messagestringcode rather than on message. When a validation failure contains one problem, this is that problem's message. When it contains several, it reads Request contains N errors."Request contains 2 errors"errorsErrorDetail[]Example
{ "code": "index:field:primary_key:multiple_unsupported", "message": "Field `id` is marked as a primary key and multiple, primary keys can not have multiple values", "path": "id"}4 properties
codestring"index:field:primary_key:multiple_unsupported"messagestring"Field `id` is marked as a primary key and multiple, primary keys can not have multiple values"pathstringfields.title or documents[1].nonexistent. Names join with ., one element of a list reads [n] counted from zero, and a key of a free-form map such as metadata goes in brackets and double quotes when it holds a dot or a bracket, as metadata["build.sha"]. A field inside an object field carries its own dotted path, so a path here reaches a field the same way a query does. Omitted when the problem applies to the request as a whole. See API conventions."id"argumentsmap of string1 property
<key>stringError codes
- auth:forbidden
- The key is accepted but does not hold the `search` permission.
ErrorResponse
The body of every failed request. Error codes use colon-separated namespaces such as index:field:name_invalid, are stable across API versions, and are never renamed or reused, so clients match on code rather than on message. See Errors.
codestringvalidation and the individual problems are listed in errors. For all other failures, this matches the code of the single entry in errors."validation"messagestringcode rather than on message. When a validation failure contains one problem, this is that problem's message. When it contains several, it reads Request contains N errors."Request contains 2 errors"errorsErrorDetail[]Example
{ "code": "index:field:primary_key:multiple_unsupported", "message": "Field `id` is marked as a primary key and multiple, primary keys can not have multiple values", "path": "id"}4 properties
codestring"index:field:primary_key:multiple_unsupported"messagestring"Field `id` is marked as a primary key and multiple, primary keys can not have multiple values"pathstringfields.title or documents[1].nonexistent. Names join with ., one element of a list reads [n] counted from zero, and a key of a free-form map such as metadata goes in brackets and double quotes when it holds a dot or a bracket, as metadata["build.sha"]. A field inside an object field carries its own dotted path, so a path here reaches a field the same way a query does. Omitted when the problem applies to the request as a whole. See API conventions."id"argumentsmap of string1 property
<key>stringError codes
- index:not_found
- The node holds no such index, or the key has no permission on it.
index:no_live_generation). Promote a generation and send the request again.ErrorResponse
The body of every failed request. Error codes use colon-separated namespaces such as index:field:name_invalid, are stable across API versions, and are never renamed or reused, so clients match on code rather than on message. See Errors.
codestringvalidation and the individual problems are listed in errors. For all other failures, this matches the code of the single entry in errors."validation"messagestringcode rather than on message. When a validation failure contains one problem, this is that problem's message. When it contains several, it reads Request contains N errors."Request contains 2 errors"errorsErrorDetail[]Example
{ "code": "index:field:primary_key:multiple_unsupported", "message": "Field `id` is marked as a primary key and multiple, primary keys can not have multiple values", "path": "id"}4 properties
codestring"index:field:primary_key:multiple_unsupported"messagestring"Field `id` is marked as a primary key and multiple, primary keys can not have multiple values"pathstringfields.title or documents[1].nonexistent. Names join with ., one element of a list reads [n] counted from zero, and a key of a free-form map such as metadata goes in brackets and double quotes when it holds a dot or a bracket, as metadata["build.sha"]. A field inside an object field carries its own dotted path, so a path here reaches a field the same way a query does. Omitted when the problem applies to the request as a whole. See API conventions."id"argumentsmap of string1 property
<key>stringError codes
- index:no_live_generation
- The index has no live generation. Promote one and send the request again.
The request raced the index being closed to free local resources (index:closed). Sending the same request again reopens it.
Also returned when counting collected for longer than EXOFIND_SUGGEST_TIMEOUT (search:timeout). The counts collected before the node stopped are dropped, so narrow the filters instead of repeating the request.
ErrorResponse
The body of every failed request. Error codes use colon-separated namespaces such as index:field:name_invalid, are stable across API versions, and are never renamed or reused, so clients match on code rather than on message. See Errors.
codestringvalidation and the individual problems are listed in errors. For all other failures, this matches the code of the single entry in errors."validation"messagestringcode rather than on message. When a validation failure contains one problem, this is that problem's message. When it contains several, it reads Request contains N errors."Request contains 2 errors"errorsErrorDetail[]Example
{ "code": "index:field:primary_key:multiple_unsupported", "message": "Field `id` is marked as a primary key and multiple, primary keys can not have multiple values", "path": "id"}4 properties
codestring"index:field:primary_key:multiple_unsupported"messagestring"Field `id` is marked as a primary key and multiple, primary keys can not have multiple values"pathstringfields.title or documents[1].nonexistent. Names join with ., one element of a list reads [n] counted from zero, and a key of a free-form map such as metadata goes in brackets and double quotes when it holds a dot or a bracket, as metadata["build.sha"]. A field inside an object field carries its own dotted path, so a path here reaches a field the same way a query does. Omitted when the problem applies to the request as a whole. See API conventions."id"argumentsmap of string1 property
<key>stringError codes
- index:closed
- The request raced the index being closed to free local resources. Sending it again reopens the index.
- search:timeout
- Collecting ran for longer than `EXOFIND_SUGGEST_TIMEOUT`. What it collected is dropped, so narrow the filters rather than sending the request again.
- search:freshness:unavailable
- The node did not reach the state the freshness token asks for within `EXOFIND_SEARCH_FRESHNESS_WAIT`. Send the request again after the `Retry-After` header.
Authorization
- Permission
- search
- Checked on
- The index the path names
- Roles
reader,writer,admin- Anonymous
- Served to a request carrying no credential where the node sets an anonymous key.
An API key sent as a bearer token, such as Authorization: Bearer exok_4ff6b760264c1918_ePQcdT1O9HSATZoXfDbT8hhHGsP9VpZH. A key carries grants that pair permissions with index patterns; the permission each endpoint needs is named beside it. Nodes running with EXOFIND_AUTH_MODE=none accept requests without a credential, and a node with EXOFIND_AUTH_ANONYMOUS_KEY set serves requests that carry none with the permissions of that key.
Exofind is built by Level Four AB and is available under the Apache License 2.0.