Skip to content

REST API

Change some of the search settings

PATCH/v1alpha1/admin/indexes/{name}/settingssettings.write

Changes named parts of the settings, leaving the rest as they are, and returns them as stored. The request body is a change object where each key is a path naming a location in the settings: a path with a value replaces the target value, a path set to null clears the target value, and an omitted path leaves the existing value unchanged.

A path is written the same way as a path into a document: names joined by ., where a name can carry a bracket selector that picks list entries by what they hold. ranking.signals[field=sales].weight changes one weight, ranking.signals[field=sales] replaces one signal, ranking.signals[] adds a signal, and ranking replaces or clears the whole ranking. A selector picks entries by content, so a change still names the same entry after the list is reordered.

A backslash escapes the character after it, so a name can hold a ., a [ or a backslash of its own: fields.variants\.colour.interpret names the field variants.colour. In JSON, write each backslash twice.

A selector holding a single word names an entry by the key its list declares: ranking.signals[sales] names the signals reading the field sales, ranking.tieBreakers[sales] the tie breaker on it, and fields.size.values[S] the declared value S. Two signals may read one field with different shapes, so a key of ranking.signals names every signal reading it, where a key of ranking.tieBreakers and of fields.<name>.values names at most one. A word on a list that declares no key, such as a synonym rule, returns settings:patch:key_unsupported. For the whole syntax, see Change paths.

The merged settings are validated against the generation the index name answers from, using the same index:ranking:* error codes as a PUT request. An index with no stored settings is modified as if it had empty settings, and the answer is 201 rather than 200 because the change stores its first ones.

Without an If-Match header, a change that conflicts with a concurrent update rebuilds on the newer version up to three times before returning storage:conflict. With an If-Match header naming versions, a version mismatch returns 412 without retrying, and an index with no settings returns 404.

Takes effect immediately on the answering node and on all other nodes within EXOFIND_SETTINGS_REFRESH_INTERVAL.

Runs on the node that writes the index.

Path parameters

namestringrequired
The index the settings belong to. Naming a generation stores the same settings and only says which generation to validate the ranking against.

Headers

If-Matchstring
Version the settings are expected to be at, as returned by a previous response's ETag. * asks only that the index has settings. Several versions may be given, separated by commas, and the header is satisfied while the stored version is one of them; versions are compared exactly, so a weak tag (W/"...") matches none. An index with no settings answers 404, and a version that no longer matches answers 412 instead of building the change on the one that replaced it.

Body

objectRequired

A value of type object.

Responses

200
The settings as stored, with their new version in the ETag header.
SearchSettingsInfo

The search settings of an index as stored, together with the observed status reported by the answering node. See Search settings.

rankingRanking
The ranking searches run with instead of the definition's ranking. Omitted when the settings configure no ranking.
Example
{
"tieBreakers": [
{
"field": "sales",
"direction": "descending"
}
],
"signals": [
{
"field": "purchases",
"saturation": {
"pivot": 50
},
"weight": 0.5
}
]
}
2 properties
tieBreakersTieBreaker[]
Secondary sort criteria applied in sequence after primary sort or relevance scoring until ties are resolved. Target fields must have sort enabled.
Example
{
"field": "sales",
"direction": "descending"
}
2 properties
fieldstringrequired
The field to break ties by. Must have sort enabled.
Example
"sales"
directionDirection
The sort direction for breaking ties. Defaults to descending.
Default
"descending"
Values
"ascending", "descending"
signalsSignalDefinition[]
Document values multiplied into relevance scores in sequence. Evaluated at search time without reindexing, and applied only when results are ordered by relevance. A search request that specifies signals adds to these rules or replaces them based on signalsMode.
Example
{
"field": "purchases",
"saturation": {
"pivot": 50
},
"weight": 0.5
}
5 properties
fieldstringrequired
The field to read the value from. Must be a number or timestamp field with sorting enabled.
Example
"purchases"
saturationRankingSaturation
Ranks by how far the value rises above a pivot. For int32, int64, float and double fields.
Example
{
"pivot": 50
}
1 property
pivotnumberrequired
The value that counts for half of what the signal can give. Required, and must be greater than 0.
Format
double
Example
50
decayRankingDecay
Ranks by how long ago the value was. For timestamp fields.
Example
{
"halfLife": 604800
}
1 property
halfLifeintegerrequired
How many seconds it takes for the signal to be worth half as much. Required, and must be greater than 0.
Format
int64
Example
604800
linearRankingLinear
Ranks by how far the value is toward a ceiling, as value / ceiling held between 0 and 1. For int32, int64, float and double fields holding a score computed elsewhere, such as an engagement score between 0 and 1.
Example
{
"ceiling": 1
}
1 property
ceilingnumberrequired
The value that counts for all of what the signal can give. Required, and must be greater than 0.
Format
double
Example
1
weightnumber
How much the signal can lift a document at most, as a share of its score. At 1, a document at the top of the signal reaches twice the score of one holding no value at all.
Default
1
Format
float
synonymsmap of QuerySynonyms
Synonym sets applied to the text of a search, keyed by set name. Omitted when the settings configure no synonyms.
1 property
A synonym set applied to the search query at query time, rather than to document values during indexing.
Example
{
"rules": [
{
"equivalent": [
"laptop",
"notebook"
]
}
],
"fields": [
"name"
],
"boost": 0.8
}
3 properties
rulesRule[]
The rules of the set, using the same shape as rules in an index definition's resources.
Example
{
"equivalent": [
"car",
"automobile"
]
}
2 properties
equivalentstring[]
Interchangeable terms where each term matches every other term. Multi-word terms match words in sequence.
mappingMapping
A one-way mapping rule: values containing a term in from also match searches for any term in to, but not the reverse.
Example
{
"from": [
"ny"
],
"to": [
"new york"
]
}
2 properties
fromstring[]required
Source terms matched by the mapping rule.
tostring[]required
Target terms that the source terms map to.
fieldsstring[]
An optional list of field names the set applies to, named as a search names them. If omitted, the set applies to every field searched as text. Target fields are validated against the generation the index answers from at write time; a generation promoted later that lacks a named field causes searches to skip that field rather than fail.
boostnumber
A positive number specifying what a term added by the rules counts against the typed term. Default 0.8. Values below 1 rank a document holding the typed term above one holding only a synonym. A value of 1 weighs synonyms and typed terms equally.
Format
float
Example
0.8
typoExclusionsmap of TypoExclusions
Words matched as they are spelled, keyed by list name. Omitted when the settings configure no typo exclusions.
1 property
Words matched as they are spelled, regardless of the typo tolerance configured on the searched fields.
Example
{
"words": [
"adidas",
"X-15"
],
"fields": [
"name"
]
}
2 properties
wordsstring[]
The words, as typed. Words are read through the analysis chain of each field they are excluded in. A word the chain leaves nothing of (such as a stopword) excludes nothing, and a word the chain produces several terms from excludes each of them.
fieldsstring[]
An optional list of field names the words are excluded in, named as a search names them. If omitted, the list covers every field searched as text. Field names are validated against the active generation at write time; a generation promoted later that lacks a named field applies typo tolerance as configured in the index definition.
fieldsmap of FieldSettings
Settings that apply to one field, keyed by field name. Omitted when the settings configure no field.
1 property
How searches read one field. Every capability is off unless its object is present; an empty object turns it on with the engine defaults.
Example
{
"interpret": {},
"suggest": {},
"values": [
{
"value": "S",
"order": 1,
"labels": {
"en": "Small",
"sv": "Liten"
}
}
]
}
3 properties
interpretInterpretUsage
Reads the values the field holds out of the query text of a search in user mode, as a filter on the field. The field must be a string field with filter and facet and without hierarchy; otherwise the request returns settings:fields:interpret_unsupported. Carries no options. See Reading the values of a field.
Example
{}
valuesDeclaredValue[]
Values of the field with a declared order and labels per locale. A facet with "order": "declared" answers these values first, by order, and every other value after them by count. A facet answers each value's label in the locale of the search, a prefix search of the facet matches labels as well as values, and a search in user mode with interpret on the field reads a typed label as its value. The field must be a string field with facet and without hierarchy; otherwise the request returns settings:fields:values_unsupported. At most 10000 values per field. See Field settings.
Example
{
"value": "S",
"order": 1,
"labels": {
"en": "Small",
"sv": "Liten"
}
}
3 properties
valuestring
The value as the field stores it, which is what a facet counts and a filter matches. Required and unique within the field; otherwise the request returns settings:fields:values_invalid.
Example
"S"
orderinteger
Where the value sits in a facet ordered by declared, lower first; values sharing an order are sorted by count. If omitted, the value is ordered by count after every value that has an order, so labels can be declared without an order.
Format
int32
Example
1
labelsmap of string
What a person reads instead of the value, keyed by BCP-47 tag in canonical form (sv, en-GB). A search answers the label of its locale, matched as closely as the tags tell apart, and the label of the field's default locale where its own has none. A tag that is not canonical, or a blank label, returns settings:fields:values_invalid.
1 property
<key>string
suggestSuggest
Suggests the values the field holds while a search is typed, through POST /v1alpha1/indexes/{name}/suggest. The field must be a string field with facet and without hierarchy; otherwise the request returns settings:fields:suggest_unsupported. Carries no options. See Suggesting what to search for.
Example
{}
versionstring
An identifier for the stored settings version, also returned in the ETag header. Pass this value in the If-Match header on PUT and PATCH requests to prevent overwriting concurrent updates; a mismatch returns 412.
Example
"9f2c1a0b3d4e5f60"
unsupportedFeaturesstring[]
Present only when the answering node sets the settings aside because they use capabilities its version does not have. The node searches with the definition alone. Upgrade the node to put the settings in force.
freshnessstring
A freshness token for the state the change landed in. Present on the answer to a PUT and a PATCH, and omitted on a GET. Pass it as freshness.atLeast on a search, and the search is answered with these settings in force whichever node it lands on. Opaque; pass it back unchanged. See Freshness.
Example
"AQoIcHJvZHVjdHMiIiJhYjEyY2QzNCI"
201
The index had no settings, so the change stored its first ones. The version is in the ETag header.
SearchSettingsInfo

The search settings of an index as stored, together with the observed status reported by the answering node. See Search settings.

rankingRanking
The ranking searches run with instead of the definition's ranking. Omitted when the settings configure no ranking.
Example
{
"tieBreakers": [
{
"field": "sales",
"direction": "descending"
}
],
"signals": [
{
"field": "purchases",
"saturation": {
"pivot": 50
},
"weight": 0.5
}
]
}
2 properties
tieBreakersTieBreaker[]
Secondary sort criteria applied in sequence after primary sort or relevance scoring until ties are resolved. Target fields must have sort enabled.
Example
{
"field": "sales",
"direction": "descending"
}
2 properties
fieldstringrequired
The field to break ties by. Must have sort enabled.
Example
"sales"
directionDirection
The sort direction for breaking ties. Defaults to descending.
Default
"descending"
Values
"ascending", "descending"
signalsSignalDefinition[]
Document values multiplied into relevance scores in sequence. Evaluated at search time without reindexing, and applied only when results are ordered by relevance. A search request that specifies signals adds to these rules or replaces them based on signalsMode.
Example
{
"field": "purchases",
"saturation": {
"pivot": 50
},
"weight": 0.5
}
5 properties
fieldstringrequired
The field to read the value from. Must be a number or timestamp field with sorting enabled.
Example
"purchases"
saturationRankingSaturation
Ranks by how far the value rises above a pivot. For int32, int64, float and double fields.
Example
{
"pivot": 50
}
1 property
pivotnumberrequired
The value that counts for half of what the signal can give. Required, and must be greater than 0.
Format
double
Example
50
decayRankingDecay
Ranks by how long ago the value was. For timestamp fields.
Example
{
"halfLife": 604800
}
1 property
halfLifeintegerrequired
How many seconds it takes for the signal to be worth half as much. Required, and must be greater than 0.
Format
int64
Example
604800
linearRankingLinear
Ranks by how far the value is toward a ceiling, as value / ceiling held between 0 and 1. For int32, int64, float and double fields holding a score computed elsewhere, such as an engagement score between 0 and 1.
Example
{
"ceiling": 1
}
1 property
ceilingnumberrequired
The value that counts for all of what the signal can give. Required, and must be greater than 0.
Format
double
Example
1
weightnumber
How much the signal can lift a document at most, as a share of its score. At 1, a document at the top of the signal reaches twice the score of one holding no value at all.
Default
1
Format
float
synonymsmap of QuerySynonyms
Synonym sets applied to the text of a search, keyed by set name. Omitted when the settings configure no synonyms.
1 property
A synonym set applied to the search query at query time, rather than to document values during indexing.
Example
{
"rules": [
{
"equivalent": [
"laptop",
"notebook"
]
}
],
"fields": [
"name"
],
"boost": 0.8
}
3 properties
rulesRule[]
The rules of the set, using the same shape as rules in an index definition's resources.
Example
{
"equivalent": [
"car",
"automobile"
]
}
2 properties
equivalentstring[]
Interchangeable terms where each term matches every other term. Multi-word terms match words in sequence.
mappingMapping
A one-way mapping rule: values containing a term in from also match searches for any term in to, but not the reverse.
Example
{
"from": [
"ny"
],
"to": [
"new york"
]
}
2 properties
fromstring[]required
Source terms matched by the mapping rule.
tostring[]required
Target terms that the source terms map to.
fieldsstring[]
An optional list of field names the set applies to, named as a search names them. If omitted, the set applies to every field searched as text. Target fields are validated against the generation the index answers from at write time; a generation promoted later that lacks a named field causes searches to skip that field rather than fail.
boostnumber
A positive number specifying what a term added by the rules counts against the typed term. Default 0.8. Values below 1 rank a document holding the typed term above one holding only a synonym. A value of 1 weighs synonyms and typed terms equally.
Format
float
Example
0.8
typoExclusionsmap of TypoExclusions
Words matched as they are spelled, keyed by list name. Omitted when the settings configure no typo exclusions.
1 property
Words matched as they are spelled, regardless of the typo tolerance configured on the searched fields.
Example
{
"words": [
"adidas",
"X-15"
],
"fields": [
"name"
]
}
2 properties
wordsstring[]
The words, as typed. Words are read through the analysis chain of each field they are excluded in. A word the chain leaves nothing of (such as a stopword) excludes nothing, and a word the chain produces several terms from excludes each of them.
fieldsstring[]
An optional list of field names the words are excluded in, named as a search names them. If omitted, the list covers every field searched as text. Field names are validated against the active generation at write time; a generation promoted later that lacks a named field applies typo tolerance as configured in the index definition.
fieldsmap of FieldSettings
Settings that apply to one field, keyed by field name. Omitted when the settings configure no field.
1 property
How searches read one field. Every capability is off unless its object is present; an empty object turns it on with the engine defaults.
Example
{
"interpret": {},
"suggest": {},
"values": [
{
"value": "S",
"order": 1,
"labels": {
"en": "Small",
"sv": "Liten"
}
}
]
}
3 properties
interpretInterpretUsage
Reads the values the field holds out of the query text of a search in user mode, as a filter on the field. The field must be a string field with filter and facet and without hierarchy; otherwise the request returns settings:fields:interpret_unsupported. Carries no options. See Reading the values of a field.
Example
{}
valuesDeclaredValue[]
Values of the field with a declared order and labels per locale. A facet with "order": "declared" answers these values first, by order, and every other value after them by count. A facet answers each value's label in the locale of the search, a prefix search of the facet matches labels as well as values, and a search in user mode with interpret on the field reads a typed label as its value. The field must be a string field with facet and without hierarchy; otherwise the request returns settings:fields:values_unsupported. At most 10000 values per field. See Field settings.
Example
{
"value": "S",
"order": 1,
"labels": {
"en": "Small",
"sv": "Liten"
}
}
3 properties
valuestring
The value as the field stores it, which is what a facet counts and a filter matches. Required and unique within the field; otherwise the request returns settings:fields:values_invalid.
Example
"S"
orderinteger
Where the value sits in a facet ordered by declared, lower first; values sharing an order are sorted by count. If omitted, the value is ordered by count after every value that has an order, so labels can be declared without an order.
Format
int32
Example
1
labelsmap of string
What a person reads instead of the value, keyed by BCP-47 tag in canonical form (sv, en-GB). A search answers the label of its locale, matched as closely as the tags tell apart, and the label of the field's default locale where its own has none. A tag that is not canonical, or a blank label, returns settings:fields:values_invalid.
1 property
<key>string
suggestSuggest
Suggests the values the field holds while a search is typed, through POST /v1alpha1/indexes/{name}/suggest. The field must be a string field with facet and without hierarchy; otherwise the request returns settings:fields:suggest_unsupported. Carries no options. See Suggesting what to search for.
Example
{}
versionstring
An identifier for the stored settings version, also returned in the ETag header. Pass this value in the If-Match header on PUT and PATCH requests to prevent overwriting concurrent updates; a mismatch returns 412.
Example
"9f2c1a0b3d4e5f60"
unsupportedFeaturesstring[]
Present only when the answering node sets the settings aside because they use capabilities its version does not have. The node searches with the definition alone. Upgrade the node to put the settings in force.
freshnessstring
A freshness token for the state the change landed in. Present on the answer to a PUT and a PATCH, and omitted on a GET. Pass it as freshness.atLeast on a search, and the search is answered with these settings in force whichever node it lands on. Opaque; pass it back unchanged. See Freshness.
Example
"AQoIcHJvZHVjdHMiIiJhYjEyY2QzNCI"
400
The request body is missing, a key names a place the settings cannot be changed at, or the result failed validation against the generation the index answers from.
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.

codestring
Identifies the failure type. For validation failures, this is validation and the individual problems are listed in errors. For all other failures, this matches the code of the single entry in errors.
Example
"validation"
messagestring
Human-readable message for log output. Match on code 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.
Example
"Request contains 2 errors"
All problems found in the request. A validation failure reports every field with a problem, so a caller can fix them in one pass rather than one request at a time.
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
The error code identifying this specific problem.
Example
"index:field:primary_key:multiple_unsupported"
messagestring
Human-readable description of this problem.
Example
"Field `id` is marked as a primary key and multiple, primary keys can not have multiple values"
pathstring
Location of the offending value in the request, such as fields.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.
Example
"id"
argumentsmap of string
The values the message was rendered with, so a client can render a message of its own from the code.
1 property
<key>string
Error codes
request:body_required
The request carries no body.
settings:patch:path_invalid
A key of the change could not be read as a path.
settings:patch:no_match
A selector names nothing the settings hold. A selector never creates the value it names.
settings:patch:value_invalid
A key names a field that cannot hold the given value.
settings:patch:field_unknown
A key reaches into a field the search settings do not have.
settings:patch:not_an_object
A key reaches inside a field that holds no fields.
settings:patch:selector_required
A key names a field that holds a list without saying which value, such as `ranking.signals[field=sales]`.
settings:patch:selector_unsupported
A key names one value of a field that holds no list.
settings:patch:add_reaches_inside
A key reaches inside a value that the same change adds, which does not exist yet. Give the whole value instead.
settings:patch:add_unsupported
A key adds a value to a field that holds a single value, such as `ranking[]`. Name the field on its own to replace it.
settings:patch:key_unsupported
A key names a list entry by a single word on a list that declares no key, such as `synonyms.<name>.rules[x]`. Name a field inside the entry instead, as `rules[field=value]`.
settings:patch:match_not_an_object
A key matches on a field inside the entries of a list whose entries are not objects.
request:value_required
A property of the settings that needs a value is `null`.
settings:synonyms:field_unknown
A synonym set names a field the generation does not have.
settings:synonyms:field_unsupported
A synonym set names a field that is not searched as text.
settings:synonyms:boost_out_of_range
The boost of a synonym set is not a positive number.
settings:synonyms:rule_invalid
A synonym rule is not exactly one kind - equivalent words, or a one-way mapping.
settings:typo_exclusions:field_unknown
A typo exclusion names a field the generation does not have.
settings:typo_exclusions:field_unsupported
A typo exclusion names a field that is not searched as text.
settings:fields:field_unknown
The field settings name a field the generation does not have.
settings:fields:interpret_unsupported
The settings read the values of a field that is not a `string` field with `filter` and `facet` and without `hierarchy`.
settings:fields:values_unsupported
The settings declare values of a field that is not a `string` field with `facet` and without `hierarchy`.
settings:fields:values_invalid
A declared value carries no `value`, repeats one, is labelled under a tag that is not canonical BCP 47, holds a blank label, or the field declares more than 10000 values.
settings:fields:suggest_unsupported
The settings suggest the values of a field that is not a `string` field with `facet` and without `hierarchy`.
index:ranking:field_not_sortable
A ranking signal names a field that is not sortable.
index:ranking:field_unknown
A tie-breaker names a field the generation does not have.
index:ranking:wildcard_unsupported
A tie-breaker names fields with a wildcard. A tie-breaker orders by one field.
index:ranking:field_duplicate
Two tie-breakers name the same field.
index:ranking:signal:field_unknown
A ranking signal names a field the generation does not have.
index:ranking:signal:wildcard_unsupported
A ranking signal names fields with a wildcard. A signal reads one field.
index:ranking:signal:field_not_sortable
A ranking signal names a field that holds no value to read.
index:ranking:signal:shape_required
A ranking signal says no shape to read its field with.
index:ranking:signal:shape_unsupported
A ranking signal reads its field with a shape that the type of the field has no meaning for.
index:ranking:signal:shape_invalid
A ranking signal is not exactly one of `saturation`, `decay` and `linear`.
index:ranking:signal:pivot_out_of_range
The `pivot` of a saturation signal is not a number above zero.
index:ranking:signal:half_life_out_of_range
The `halfLife` of a decay signal is not a number of seconds above zero.
index:ranking:signal:ceiling_out_of_range
The `ceiling` of a linear signal is not a number above zero.
index:ranking:signal:weight_out_of_range
The `weight` of a ranking signal is below zero or is not a finite number.
401
The request carries no credential this node accepts. Absent, malformed, unknown and lapsed keys are all answered alike, so a refusal cannot be used to find out which keys exist. The response carries 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.

codestring
Identifies the failure type. For validation failures, this is validation and the individual problems are listed in errors. For all other failures, this matches the code of the single entry in errors.
Example
"validation"
messagestring
Human-readable message for log output. Match on code 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.
Example
"Request contains 2 errors"
All problems found in the request. A validation failure reports every field with a problem, so a caller can fix them in one pass rather than one request at a time.
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
The error code identifying this specific problem.
Example
"index:field:primary_key:multiple_unsupported"
messagestring
Human-readable description of this problem.
Example
"Field `id` is marked as a primary key and multiple, primary keys can not have multiple values"
pathstring
Location of the offending value in the request, such as fields.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.
Example
"id"
argumentsmap of string
The values the message was rendered with, so a client can render a message of its own from the code.
1 property
<key>string
Error codes
auth:unauthenticated
The request carries no credential this node accepts.
403
The API key does not have the settings.write 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.

codestring
Identifies the failure type. For validation failures, this is validation and the individual problems are listed in errors. For all other failures, this matches the code of the single entry in errors.
Example
"validation"
messagestring
Human-readable message for log output. Match on code 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.
Example
"Request contains 2 errors"
All problems found in the request. A validation failure reports every field with a problem, so a caller can fix them in one pass rather than one request at a time.
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
The error code identifying this specific problem.
Example
"index:field:primary_key:multiple_unsupported"
messagestring
Human-readable description of this problem.
Example
"Field `id` is marked as a primary key and multiple, primary keys can not have multiple values"
pathstring
Location of the offending value in the request, such as fields.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.
Example
"id"
argumentsmap of string
The values the message was rendered with, so a client can render a message of its own from the code.
1 property
<key>string
Error codes
auth:forbidden
The key is accepted but does not hold the `settings.write` permission.
404
No index has this name, the API key lacks permissions covering it, or an If-Match header was sent for an index that has no settings (settings:not_found).
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.

codestring
Identifies the failure type. For validation failures, this is validation and the individual problems are listed in errors. For all other failures, this matches the code of the single entry in errors.
Example
"validation"
messagestring
Human-readable message for log output. Match on code 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.
Example
"Request contains 2 errors"
All problems found in the request. A validation failure reports every field with a problem, so a caller can fix them in one pass rather than one request at a time.
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
The error code identifying this specific problem.
Example
"index:field:primary_key:multiple_unsupported"
messagestring
Human-readable description of this problem.
Example
"Field `id` is marked as a primary key and multiple, primary keys can not have multiple values"
pathstring
Location of the offending value in the request, such as fields.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.
Example
"id"
argumentsmap of string
The values the message was rendered with, so a client can render a message of its own from the code.
1 property
<key>string
Error codes
index:not_found
The node holds no such index, or the key has no permission on it.
settings:not_found
An `If-Match` header was sent and the index has no settings for it to match.
409
The change could not be made. The stored settings are unchanged.
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.

codestring
Identifies the failure type. For validation failures, this is validation and the individual problems are listed in errors. For all other failures, this matches the code of the single entry in errors.
Example
"validation"
messagestring
Human-readable message for log output. Match on code 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.
Example
"Request contains 2 errors"
All problems found in the request. A validation failure reports every field with a problem, so a caller can fix them in one pass rather than one request at a time.
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
The error code identifying this specific problem.
Example
"index:field:primary_key:multiple_unsupported"
messagestring
Human-readable description of this problem.
Example
"Field `id` is marked as a primary key and multiple, primary keys can not have multiple values"
pathstring
Location of the offending value in the request, such as fields.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.
Example
"id"
argumentsmap of string
The values the message was rendered with, so a client can render a message of its own from the code.
1 property
<key>string
Error codes
index:no_live_generation
The index has no live generation. Promote one and send the request again.
storage:conflict
Other writers kept changing the settings. The stored settings are unchanged; send the request again.
settings:unrepresentable
The stored settings hold parts this node cannot describe. Send the request to a node that supports them, or replace the settings with a `PUT`.
storage:io_error
Settings storage answered with an error. Send the request again.
storage:unavailable
Settings storage could not be reached. Send the request again once it answers.
indexer:unavailable
No node is available to write the index. Send the request again once one is.
412
The If-Match version does not match the stored settings (settings:version_mismatch). Read them again and rebuild the change on the version that comes back.
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.

codestring
Identifies the failure type. For validation failures, this is validation and the individual problems are listed in errors. For all other failures, this matches the code of the single entry in errors.
Example
"validation"
messagestring
Human-readable message for log output. Match on code 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.
Example
"Request contains 2 errors"
All problems found in the request. A validation failure reports every field with a problem, so a caller can fix them in one pass rather than one request at a time.
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
The error code identifying this specific problem.
Example
"index:field:primary_key:multiple_unsupported"
messagestring
Human-readable description of this problem.
Example
"Field `id` is marked as a primary key and multiple, primary keys can not have multiple values"
pathstring
Location of the offending value in the request, such as fields.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.
Example
"id"
argumentsmap of string
The values the message was rendered with, so a client can render a message of its own from the code.
1 property
<key>string
Error codes
settings:version_mismatch
The `If-Match` version is not the one the stored settings are at. Read them again and rebuild the change.
502
The index writer did not respond to the forwarded 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.

codestring
Identifies the failure type. For validation failures, this is validation and the individual problems are listed in errors. For all other failures, this matches the code of the single entry in errors.
Example
"validation"
messagestring
Human-readable message for log output. Match on code 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.
Example
"Request contains 2 errors"
All problems found in the request. A validation failure reports every field with a problem, so a caller can fix them in one pass rather than one request at a time.
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
The error code identifying this specific problem.
Example
"index:field:primary_key:multiple_unsupported"
messagestring
Human-readable description of this problem.
Example
"Field `id` is marked as a primary key and multiple, primary keys can not have multiple values"
pathstring
Location of the offending value in the request, such as fields.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.
Example
"id"
argumentsmap of string
The values the message was rendered with, so a client can render a message of its own from the code.
1 property
<key>string
Error codes
indexer:unreachable
The request was forwarded to the index writer and the writer did not answer. Send it again.

Authorization

Permission
settings.write
Checked on
The index the path names
Roles
admin

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.