Definition of a field, structured as a tagged union where type selects the field type and the properties available on it. Field usages are opt-in: adding an empty configuration object enables a usage with engine defaults, and only explicitly configured properties are stored, preserving default values across engine updates. See Field types.
Example
{
"type": "string",
"stored": true,
"filter": {},
"matching": {
"highlight": {}
}
}
Types
StringFieldDefinitiontype: "string"
Represents text data. Field usages are opt-in, each enabled by including its configuration object. An empty object enables a usage with engine defaults. See string.
Specifies a field role that applies a preset combination of usages. The role expands into explicit field properties before the definition is stored, and any property set alongside the role is preserved as given. Supported roles per type are listed under Field roles.
Marks the field as the unique document identifier. Documents with matching primary keys overwrite existing documents. An index can have at most one primary key. Primary key fields must be required and cannot be multiple, locale-specific, or wildcard fields.
Default
false
requiredboolean
When true, the engine rejects documents that lack a value for this field.
Default
false
multipleboolean
When true, the field accepts multiple values in a single document. If false, the engine rejects documents containing multiple values for the field.
Default
false
storedboolean
When true, the engine stores field values to return in search results. This setting applies only when source is set to none, as documents are otherwise preserved in full.
Configures locale-specific field values so that analysis and collation follow the locale of each value. On an index that declares locales, configuring {} gives the field every declared locale, and only narrows the field to a subset of those locales.
Example
{
"defaultLocale": "sv",
"locales": [
"en",
"de"
]
}
4 properties
defaultLocalestring
Specifies the BCP-47 fallback locale for values that carry no explicit locale. On an index that declares locales, this property defaults to the defaultLocale of the index.
Example
"sv"
localesstring[]
Lists the supported locales for the field, in addition to the default locale. The engine rejects documents containing values with unlisted locales, and queries can target any listed locale. The engine rejects this property on an index that declares locales, which narrows a field with only instead. Reading an index definition back always returns this list on each field.
onlystring[]
Specifies the locales this field holds from the locales declared in index-level locales. If omitted, the field holds all declared locales. Every tag must be one the index declares, and the list must contain the default locale of the field. The engine expands this property into defaultLocale and locales before storing the index definition, so reading a definition back returns those properties instead.
fallbackFallback
Controls whether this field participates in the index's localeFallback. Only evaluated on an index that declares a fallback; setting enabled on an index without fallback configuration is rejected.
Specifies how the text of this usage is analyzed. If omitted, the engine generates an analyzer based on the field usage and locale. See Analysis.
Example
{
"preset": "full_text"
}
3 properties
presetPreset
A preset specifies a predefined analyzer chain. The engine expands the preset before storing the index definition.
Values
"preserve_terms", "full_text"
customCustom
A custom analyzer chain that defines character filters, a tokenizer, and token filters.
Example
{
"charFilters": [
{
"htmlStrip": {}
}
],
"tokenizer": {
"icu": {}
},
"filters": [
{
"normalize": {}
},
{
"stemming": {
"locale": "sv"
}
}
]
}
3 properties
charFiltersCharFilter[]
An array of character filters applied to the raw text before tokenization, in order.
Example
{
"htmlStrip": {}
}
3 properties
htmlStripHtmlStrip
Strips HTML and XML markup and keeps text between tags.
Example
{}
mappingMappingCharFilter
Replaces occurrences of each key with its value.
Example
{
"mappings": {
"&": " and "
}
}
patternReplacePatternReplace
Replaces substrings that match a regular expression.
Example
{
"pattern": "\\s+",
"replacement": ""
}
tokenizerTokenizer
The tokenizer that splits text into tokens. If omitted, the engine chooses a tokenizer based on the locale of the value (Unicode segmentation for most locales; language-specific segmentation for Chinese, Japanese, and Korean).
Example
{
"icu": {}
}
4 properties
icuIcuTokenizer
Segments text based on Unicode rules. This is the default tokenizer.
Example
{}
whitespaceWhitespaceTokenizer
Splits text on whitespace characters.
Example
{}
keywordKeywordTokenizer
Retains the entire input value as a single token.
Example
{}
letterLetterTokenizer
Splits text on non-letter characters.
Example
{}
filtersTokenFilter[]
An array of token filters applied to tokens, in order.
Example
{
"normalize": {}
}
8 properties
normalizeNormalize
Applies Unicode normalization and case folding to make analysis case-insensitive.
Example
{
"caseFolding": true
}
stopwordsStopwordsFilter
Removes frequent words.
Example
{
"locale": "sv"
}
stemmingStemming
Reduces words to a shared root.
Example
{
"locale": "sv"
}
asciiFoldingAsciiFolding
Converts non-ASCII characters to ASCII equivalents.
Example
{
"preserveOriginal": true
}
edgeNgramEdgeNgram
Generates prefix n-grams for tokens within the specified character lengths.
Example
{
"minGram": 1,
"maxGram": 20
}
ngramNgram
Generates substring n-grams for tokens within the specified character lengths.
Example
{
"minGram": 3,
"maxGram": 5
}
synonymsSynonymsFilter
Expands tokens with synonyms from a synonym set defined in resources. Applied when a value is indexed, not when the text of a search is analyzed.
Example
{
"named": "cars"
}
decompoundDecompoundFilter
Splits compound words into parts and retains the original compound word. See Compound words. Applied at index time.
Example
{
"locale": "sv"
}
namedstring
A named chain references an analyzer defined under resources in the index definition. Used to share analyzer configurations across fields. Validation fails if the specified name does not exist under resources.
Example
"prose"
weightnumber
Relative score weight of hits in this field when querying across multiple fields.
Default
1
Format
float
highlightHighlightUsage
Enables highlighted snippet extraction in search responses. Text is stored for highlighting regardless of the stored property. Highlighting targets matching when defined; highlight on autocomplete takes effect only when matching is omitted.
Example
{}
typoToleranceTypoTolerance
Enables typo tolerance for matching search terms, including prefixes currently being typed.
Example
{
"minLengthOneTypo": 5,
"minLengthTwoTypos": 9,
"prefixLength": 1
}
4 properties
minLengthOneTypointeger
Minimum word length required to allow one typo.
Default
5
Format
int32
minLengthTwoTyposinteger
Minimum word length required to allow two typos. In autocomplete, two typos are permitted only when explicitly configured.
Default
9
Format
int32
prefixLengthinteger
Number of leading characters that must match exactly.
Default
1
Format
int32
numbersNumbers
Enables typo tolerance for digit-only words. If omitted, digit-only words require exact matches regardless of length.
Example
{}
decompoundDecompound
Controls compound word splitting in the engine-generated chain. If omitted, splitting is determined by the locale of the value. Supported only when using engine-generated analyzers; custom analyzers specified via analyzer define their own decompounding behavior. See Compound words.
Values
"none"
exactExact
Boosts documents where the query matches the full field value. Adjusts ranking only without modifying hit counts or facet distributions; analyzer normalization is applied before the comparison.
Example
{
"boost": 2
}
1 property
boostnumber
Score boost multiplier applied when a query matches the full field value.
Default
2
Format
float
lengthNormalizationLengthNormalization
Controls the field length penalty in ranking. Changes take effect at search time without reindexing.
Default
"moderate"
Values
"none", "moderate", "strong"
autocompleteTextUsage
Enables prefix matching for as-you-type search queries. A field defined only for autocomplete does not support phrase matching.
Specifies how the text of this usage is analyzed. If omitted, the engine generates an analyzer based on the field usage and locale. See Analysis.
Example
{
"preset": "full_text"
}
3 properties
presetPreset
A preset specifies a predefined analyzer chain. The engine expands the preset before storing the index definition.
Values
"preserve_terms", "full_text"
customCustom
A custom analyzer chain that defines character filters, a tokenizer, and token filters.
Example
{
"charFilters": [
{
"htmlStrip": {}
}
],
"tokenizer": {
"icu": {}
},
"filters": [
{
"normalize": {}
},
{
"stemming": {
"locale": "sv"
}
}
]
}
3 properties
charFiltersCharFilter[]
An array of character filters applied to the raw text before tokenization, in order.
Example
{
"htmlStrip": {}
}
3 properties
htmlStripHtmlStrip
Strips HTML and XML markup and keeps text between tags.
Example
{}
mappingMappingCharFilter
Replaces occurrences of each key with its value.
Example
{
"mappings": {
"&": " and "
}
}
patternReplacePatternReplace
Replaces substrings that match a regular expression.
Example
{
"pattern": "\\s+",
"replacement": ""
}
tokenizerTokenizer
The tokenizer that splits text into tokens. If omitted, the engine chooses a tokenizer based on the locale of the value (Unicode segmentation for most locales; language-specific segmentation for Chinese, Japanese, and Korean).
Example
{
"icu": {}
}
4 properties
icuIcuTokenizer
Segments text based on Unicode rules. This is the default tokenizer.
Example
{}
whitespaceWhitespaceTokenizer
Splits text on whitespace characters.
Example
{}
keywordKeywordTokenizer
Retains the entire input value as a single token.
Example
{}
letterLetterTokenizer
Splits text on non-letter characters.
Example
{}
filtersTokenFilter[]
An array of token filters applied to tokens, in order.
Example
{
"normalize": {}
}
8 properties
normalizeNormalize
Applies Unicode normalization and case folding to make analysis case-insensitive.
Example
{
"caseFolding": true
}
stopwordsStopwordsFilter
Removes frequent words.
Example
{
"locale": "sv"
}
stemmingStemming
Reduces words to a shared root.
Example
{
"locale": "sv"
}
asciiFoldingAsciiFolding
Converts non-ASCII characters to ASCII equivalents.
Example
{
"preserveOriginal": true
}
edgeNgramEdgeNgram
Generates prefix n-grams for tokens within the specified character lengths.
Example
{
"minGram": 1,
"maxGram": 20
}
ngramNgram
Generates substring n-grams for tokens within the specified character lengths.
Example
{
"minGram": 3,
"maxGram": 5
}
synonymsSynonymsFilter
Expands tokens with synonyms from a synonym set defined in resources. Applied when a value is indexed, not when the text of a search is analyzed.
Example
{
"named": "cars"
}
decompoundDecompoundFilter
Splits compound words into parts and retains the original compound word. See Compound words. Applied at index time.
Example
{
"locale": "sv"
}
namedstring
A named chain references an analyzer defined under resources in the index definition. Used to share analyzer configurations across fields. Validation fails if the specified name does not exist under resources.
Example
"prose"
weightnumber
Relative score weight of hits in this field when querying across multiple fields.
Default
1
Format
float
highlightHighlightUsage
Enables highlighted snippet extraction in search responses. Text is stored for highlighting regardless of the stored property. Highlighting targets matching when defined; highlight on autocomplete takes effect only when matching is omitted.
Example
{}
typoToleranceTypoTolerance
Enables typo tolerance for matching search terms, including prefixes currently being typed.
Example
{
"minLengthOneTypo": 5,
"minLengthTwoTypos": 9,
"prefixLength": 1
}
4 properties
minLengthOneTypointeger
Minimum word length required to allow one typo.
Default
5
Format
int32
minLengthTwoTyposinteger
Minimum word length required to allow two typos. In autocomplete, two typos are permitted only when explicitly configured.
Default
9
Format
int32
prefixLengthinteger
Number of leading characters that must match exactly.
Default
1
Format
int32
numbersNumbers
Enables typo tolerance for digit-only words. If omitted, digit-only words require exact matches regardless of length.
Example
{}
decompoundDecompound
Controls compound word splitting in the engine-generated chain. If omitted, splitting is determined by the locale of the value. Supported only when using engine-generated analyzers; custom analyzers specified via analyzer define their own decompounding behavior. See Compound words.
Values
"none"
exactExact
Boosts documents where the query matches the full field value. Adjusts ranking only without modifying hit counts or facet distributions; analyzer normalization is applied before the comparison.
Example
{
"boost": 2
}
1 property
boostnumber
Score boost multiplier applied when a query matches the full field value.
Default
2
Format
float
lengthNormalizationLengthNormalization
Controls the field length penalty in ranking. Changes take effect at search time without reindexing.
Default
"moderate"
Values
"none", "moderate", "strong"
hierarchyHierarchy
Enables path hierarchy matching (for example, Men/Shoes/Running). Facets on hierarchy fields return nested counts per level, and the under matcher filters to a level and all sub-levels.
Example
{
"separator": "/"
}
1 property
separatorstring
Specifies the string that separates hierarchy levels. Changing the separator on an index that contains documents requires reindexing them.
Default
"/"
BooleanFieldDefinitiontype: "boolean"
Represents boolean values (true or false). A boolean has nothing to analyze, so filtering is the only way to search it.
primaryKeyboolean
Marks the field as the unique document identifier. Documents with matching primary keys overwrite existing documents. An index can have at most one primary key. Primary key fields must be required and cannot be multiple, locale-specific, or wildcard fields.
Default
false
requiredboolean
When true, the engine rejects documents that lack a value for this field.
Default
false
multipleboolean
When true, the field accepts multiple values in a single document. If false, the engine rejects documents containing multiple values for the field.
Default
false
storedboolean
When true, the engine stores field values to return in search results. This setting applies only when source is set to none, as documents are otherwise preserved in full.
Configures locale-specific field values so that analysis and collation follow the locale of each value. On an index that declares locales, configuring {} gives the field every declared locale, and only narrows the field to a subset of those locales.
Example
{
"defaultLocale": "sv",
"locales": [
"en",
"de"
]
}
4 properties
defaultLocalestring
Specifies the BCP-47 fallback locale for values that carry no explicit locale. On an index that declares locales, this property defaults to the defaultLocale of the index.
Example
"sv"
localesstring[]
Lists the supported locales for the field, in addition to the default locale. The engine rejects documents containing values with unlisted locales, and queries can target any listed locale. The engine rejects this property on an index that declares locales, which narrows a field with only instead. Reading an index definition back always returns this list on each field.
onlystring[]
Specifies the locales this field holds from the locales declared in index-level locales. If omitted, the field holds all declared locales. Every tag must be one the index declares, and the list must contain the default locale of the field. The engine expands this property into defaultLocale and locales before storing the index definition, so reading a definition back returns those properties instead.
fallbackFallback
Controls whether this field participates in the index's localeFallback. Only evaluated on an index that declares a fallback; setting enabled on an index without fallback configuration is rejected.
Enables value count aggregations. On numeric and timestamp fields, it also enables range buckets.
Example
{}
VectorFieldDefinitiontype: "vector"
Represents an array of floating-point numbers searched by similarity using the knn search clause. Vector fields do not support filter, sort, facet, or locales. Vectors must be supplied in document payloads. See Search by vector.
primaryKeyboolean
Marks the field as the unique document identifier. Documents with matching primary keys overwrite existing documents. An index can have at most one primary key. Primary key fields must be required and cannot be multiple, locale-specific, or wildcard fields.
Default
false
requiredboolean
When true, the engine rejects documents that lack a value for this field.
Default
false
multipleboolean
When true, the field accepts multiple values in a single document. If false, the engine rejects documents containing multiple values for the field.
Default
false
storedboolean
When true, the engine stores field values to return in search results. This setting applies only when source is set to none, as documents are otherwise preserved in full.
Not supported on a vector field; setting it is rejected.
Example
{
"defaultLocale": "sv",
"locales": [
"en",
"de"
]
}
4 properties
defaultLocalestring
Specifies the BCP-47 fallback locale for values that carry no explicit locale. On an index that declares locales, this property defaults to the defaultLocale of the index.
Example
"sv"
localesstring[]
Lists the supported locales for the field, in addition to the default locale. The engine rejects documents containing values with unlisted locales, and queries can target any listed locale. The engine rejects this property on an index that declares locales, which narrows a field with only instead. Reading an index definition back always returns this list on each field.
onlystring[]
Specifies the locales this field holds from the locales declared in index-level locales. If omitted, the field holds all declared locales. Every tag must be one the index declares, and the list must contain the default locale of the field. The engine expands this property into defaultLocale and locales before storing the index definition, so reading a definition back returns those properties instead.
fallbackFallback
Controls whether this field participates in the index's localeFallback. Only evaluated on an index that declares a fallback; setting enabled on an index without fallback configuration is rejected.
Hierarchical Navigable Small World index configuration.
Example
{
"m": 16,
"efConstruction": 100
}
2 properties
minteger
Number of bi-directional links per node.
Format
int32
efConstructioninteger
Size of dynamic candidate list evaluated during index construction.
Format
int32
quantizationQuantization
Vector compression method.
Default
"none"
Values
"none", "int8", "int4"
Int32FieldDefinitiontype: "int32"
Represents a 32-bit signed integer. Numeric fields do not support text analysis and are searched by filtering, which supports exact matches and range queries.
primaryKeyboolean
Marks the field as the unique document identifier. Documents with matching primary keys overwrite existing documents. An index can have at most one primary key. Primary key fields must be required and cannot be multiple, locale-specific, or wildcard fields.
Default
false
requiredboolean
When true, the engine rejects documents that lack a value for this field.
Default
false
multipleboolean
When true, the field accepts multiple values in a single document. If false, the engine rejects documents containing multiple values for the field.
Default
false
storedboolean
When true, the engine stores field values to return in search results. This setting applies only when source is set to none, as documents are otherwise preserved in full.
Configures locale-specific field values so that analysis and collation follow the locale of each value. On an index that declares locales, configuring {} gives the field every declared locale, and only narrows the field to a subset of those locales.
Example
{
"defaultLocale": "sv",
"locales": [
"en",
"de"
]
}
4 properties
defaultLocalestring
Specifies the BCP-47 fallback locale for values that carry no explicit locale. On an index that declares locales, this property defaults to the defaultLocale of the index.
Example
"sv"
localesstring[]
Lists the supported locales for the field, in addition to the default locale. The engine rejects documents containing values with unlisted locales, and queries can target any listed locale. The engine rejects this property on an index that declares locales, which narrows a field with only instead. Reading an index definition back always returns this list on each field.
onlystring[]
Specifies the locales this field holds from the locales declared in index-level locales. If omitted, the field holds all declared locales. Every tag must be one the index declares, and the list must contain the default locale of the field. The engine expands this property into defaultLocale and locales before storing the index definition, so reading a definition back returns those properties instead.
fallbackFallback
Controls whether this field participates in the index's localeFallback. Only evaluated on an index that declares a fallback; setting enabled on an index without fallback configuration is rejected.
Makes the field a ranking signal that is refreshed in place through the document update action, without indexing the document again. A signal field is sortable and is returned in results, but is left out of the document source and cannot be combined with filter, facet, stored, multiple, locales or primaryKey. A document indexed without a value keeps the value the field holds. See Signal fields.
Example
{}
validationInt32Validation
Sets allowed numeric bounds. Documents containing values outside these bounds are rejected.
Example
{
"min": 0,
"max": 100
}
2 properties
mininteger
Lowest value accepted.
Format
int32
Example
0
maxinteger
Highest value accepted.
Format
int32
unitstring
What the values are measured in: an ISO 4217 currency code such as SEK, a CLDR unit identifier such as kilogram or gigabyte, or any other text matched as written. A search in user mode reads a number typed next to the unit, or next to a comparative word such as under, as a filter on this field. Changing the unit does not require a reindex. See Reading numbers and units.
Example
"SEK"
Int64FieldDefinitiontype: "int64"
Represents a 64-bit signed integer. Numeric fields do not support text analysis and are searched by filtering, which supports exact matches and range queries.
primaryKeyboolean
Marks the field as the unique document identifier. Documents with matching primary keys overwrite existing documents. An index can have at most one primary key. Primary key fields must be required and cannot be multiple, locale-specific, or wildcard fields.
Default
false
requiredboolean
When true, the engine rejects documents that lack a value for this field.
Default
false
multipleboolean
When true, the field accepts multiple values in a single document. If false, the engine rejects documents containing multiple values for the field.
Default
false
storedboolean
When true, the engine stores field values to return in search results. This setting applies only when source is set to none, as documents are otherwise preserved in full.
Configures locale-specific field values so that analysis and collation follow the locale of each value. On an index that declares locales, configuring {} gives the field every declared locale, and only narrows the field to a subset of those locales.
Example
{
"defaultLocale": "sv",
"locales": [
"en",
"de"
]
}
4 properties
defaultLocalestring
Specifies the BCP-47 fallback locale for values that carry no explicit locale. On an index that declares locales, this property defaults to the defaultLocale of the index.
Example
"sv"
localesstring[]
Lists the supported locales for the field, in addition to the default locale. The engine rejects documents containing values with unlisted locales, and queries can target any listed locale. The engine rejects this property on an index that declares locales, which narrows a field with only instead. Reading an index definition back always returns this list on each field.
onlystring[]
Specifies the locales this field holds from the locales declared in index-level locales. If omitted, the field holds all declared locales. Every tag must be one the index declares, and the list must contain the default locale of the field. The engine expands this property into defaultLocale and locales before storing the index definition, so reading a definition back returns those properties instead.
fallbackFallback
Controls whether this field participates in the index's localeFallback. Only evaluated on an index that declares a fallback; setting enabled on an index without fallback configuration is rejected.
Makes the field a ranking signal that is refreshed in place through the document update action, without indexing the document again. A signal field is sortable and is returned in results, but is left out of the document source and cannot be combined with filter, facet, stored, multiple, locales or primaryKey. A document indexed without a value keeps the value the field holds. See Signal fields.
Example
{}
validationInt64Validation
Sets allowed numeric bounds. Documents containing values outside these bounds are rejected.
Example
{
"min": 0,
"max": 1099511627776
}
2 properties
mininteger
Lowest value accepted.
Format
int64
maxinteger
Highest value accepted.
Format
int64
unitstring
What the values are measured in: an ISO 4217 currency code such as SEK, a CLDR unit identifier such as kilogram or gigabyte, or any other text matched as written. A search in user mode reads a number typed next to the unit, or next to a comparative word such as under, as a filter on this field. Changing the unit does not require a reindex. See Reading numbers and units.
Example
"gigabyte"
FloatFieldDefinitiontype: "float"
Represents a 32-bit floating point number. Numeric fields do not support text analysis and are searched by filtering, which supports exact matches and range queries.
primaryKeyboolean
Marks the field as the unique document identifier. Documents with matching primary keys overwrite existing documents. An index can have at most one primary key. Primary key fields must be required and cannot be multiple, locale-specific, or wildcard fields.
Default
false
requiredboolean
When true, the engine rejects documents that lack a value for this field.
Default
false
multipleboolean
When true, the field accepts multiple values in a single document. If false, the engine rejects documents containing multiple values for the field.
Default
false
storedboolean
When true, the engine stores field values to return in search results. This setting applies only when source is set to none, as documents are otherwise preserved in full.
Configures locale-specific field values so that analysis and collation follow the locale of each value. On an index that declares locales, configuring {} gives the field every declared locale, and only narrows the field to a subset of those locales.
Example
{
"defaultLocale": "sv",
"locales": [
"en",
"de"
]
}
4 properties
defaultLocalestring
Specifies the BCP-47 fallback locale for values that carry no explicit locale. On an index that declares locales, this property defaults to the defaultLocale of the index.
Example
"sv"
localesstring[]
Lists the supported locales for the field, in addition to the default locale. The engine rejects documents containing values with unlisted locales, and queries can target any listed locale. The engine rejects this property on an index that declares locales, which narrows a field with only instead. Reading an index definition back always returns this list on each field.
onlystring[]
Specifies the locales this field holds from the locales declared in index-level locales. If omitted, the field holds all declared locales. Every tag must be one the index declares, and the list must contain the default locale of the field. The engine expands this property into defaultLocale and locales before storing the index definition, so reading a definition back returns those properties instead.
fallbackFallback
Controls whether this field participates in the index's localeFallback. Only evaluated on an index that declares a fallback; setting enabled on an index without fallback configuration is rejected.
Makes the field a ranking signal that is refreshed in place through the document update action, without indexing the document again. A signal field is sortable and is returned in results, but is left out of the document source and cannot be combined with filter, facet, stored, multiple, locales or primaryKey. A document indexed without a value keeps the value the field holds. See Signal fields.
Example
{}
validationFloatValidation
Sets allowed numeric bounds. Documents containing values outside these bounds are rejected.
Example
{
"min": 0,
"max": 5
}
2 properties
minnumber
Lowest value accepted.
Format
float
maxnumber
Highest value accepted.
Format
float
unitstring
What the values are measured in: an ISO 4217 currency code such as SEK, a CLDR unit identifier such as kilogram or gigabyte, or any other text matched as written. A search in user mode reads a number typed next to the unit, or next to a comparative word such as under, as a filter on this field. Changing the unit does not require a reindex. See Reading numbers and units.
Example
"kilogram"
DoubleFieldDefinitiontype: "double"
Represents a 64-bit floating-point number. A number has nothing to analyze, so it is searched by filtering, which supports both exact matches and range queries.
primaryKeyboolean
Marks the field as the unique document identifier. Documents with matching primary keys overwrite existing documents. An index can have at most one primary key. Primary key fields must be required and cannot be multiple, locale-specific, or wildcard fields.
Default
false
requiredboolean
When true, the engine rejects documents that lack a value for this field.
Default
false
multipleboolean
When true, the field accepts multiple values in a single document. If false, the engine rejects documents containing multiple values for the field.
Default
false
storedboolean
When true, the engine stores field values to return in search results. This setting applies only when source is set to none, as documents are otherwise preserved in full.
Configures locale-specific field values so that analysis and collation follow the locale of each value. On an index that declares locales, configuring {} gives the field every declared locale, and only narrows the field to a subset of those locales.
Example
{
"defaultLocale": "sv",
"locales": [
"en",
"de"
]
}
4 properties
defaultLocalestring
Specifies the BCP-47 fallback locale for values that carry no explicit locale. On an index that declares locales, this property defaults to the defaultLocale of the index.
Example
"sv"
localesstring[]
Lists the supported locales for the field, in addition to the default locale. The engine rejects documents containing values with unlisted locales, and queries can target any listed locale. The engine rejects this property on an index that declares locales, which narrows a field with only instead. Reading an index definition back always returns this list on each field.
onlystring[]
Specifies the locales this field holds from the locales declared in index-level locales. If omitted, the field holds all declared locales. Every tag must be one the index declares, and the list must contain the default locale of the field. The engine expands this property into defaultLocale and locales before storing the index definition, so reading a definition back returns those properties instead.
fallbackFallback
Controls whether this field participates in the index's localeFallback. Only evaluated on an index that declares a fallback; setting enabled on an index without fallback configuration is rejected.
Makes the field a ranking signal that is refreshed in place through the document update action, without indexing the document again. A signal field is sortable and is returned in results, but is left out of the document source and cannot be combined with filter, facet, stored, multiple, locales or primaryKey. A document indexed without a value keeps the value the field holds. See Signal fields.
Example
{}
validationDoubleValidation
Sets allowed numeric bounds. Documents containing values outside these bounds are rejected.
Example
{
"min": 0,
"max": 1000
}
2 properties
minnumber
Lowest value accepted.
Format
double
maxnumber
Highest value accepted.
Format
double
unitstring
What the values are measured in: an ISO 4217 currency code such as SEK, a CLDR unit identifier such as kilogram or gigabyte, or any other text matched as written. A search in user mode reads a number typed next to the unit, or next to a comparative word such as under, as a filter on this field. Changing the unit does not require a reindex. See Reading numbers and units.
Example
"EUR"
TimestampFieldDefinitiontype: "timestamp"
Represents an instant in time formatted as an ISO 8601 date-time string with a timezone offset (for example, Z or +02:00). Timestamps are stored and compared at millisecond precision. Values representing the same instant are identical for filtering and sorting; search results return the original string format provided during ingestion. Documents containing timestamps without timezone offsets are rejected.
Specifies a field role that applies a preset combination of usages. The role expands into explicit field properties before the definition is stored, and any property set alongside the role is preserved as given. Supported roles per type are listed under Field roles.
Marks the field as the unique document identifier. Documents with matching primary keys overwrite existing documents. An index can have at most one primary key. Primary key fields must be required and cannot be multiple, locale-specific, or wildcard fields.
Default
false
requiredboolean
When true, the engine rejects documents that lack a value for this field.
Default
false
multipleboolean
When true, the field accepts multiple values in a single document. If false, the engine rejects documents containing multiple values for the field.
Default
false
storedboolean
When true, the engine stores field values to return in search results. This setting applies only when source is set to none, as documents are otherwise preserved in full.
Configures locale-specific field values so that analysis and collation follow the locale of each value. On an index that declares locales, configuring {} gives the field every declared locale, and only narrows the field to a subset of those locales.
Example
{
"defaultLocale": "sv",
"locales": [
"en",
"de"
]
}
4 properties
defaultLocalestring
Specifies the BCP-47 fallback locale for values that carry no explicit locale. On an index that declares locales, this property defaults to the defaultLocale of the index.
Example
"sv"
localesstring[]
Lists the supported locales for the field, in addition to the default locale. The engine rejects documents containing values with unlisted locales, and queries can target any listed locale. The engine rejects this property on an index that declares locales, which narrows a field with only instead. Reading an index definition back always returns this list on each field.
onlystring[]
Specifies the locales this field holds from the locales declared in index-level locales. If omitted, the field holds all declared locales. Every tag must be one the index declares, and the list must contain the default locale of the field. The engine expands this property into defaultLocale and locales before storing the index definition, so reading a definition back returns those properties instead.
fallbackFallback
Controls whether this field participates in the index's localeFallback. Only evaluated on an index that declares a fallback; setting enabled on an index without fallback configuration is rejected.
Enables value count aggregations. On numeric and timestamp fields, it also enables range buckets.
Example
{}
GeoPointFieldDefinitiontype: "geo_point"
Represents a geographic location defined by WGS 84 lat and lon coordinates. Locations are searched by distance rather than exact value: filter enables the distance matcher, and sort enables ordering by distance from an origin, nearest first.
Specifies a field role that applies a preset combination of usages. The role expands into explicit field properties before the definition is stored, and any property set alongside the role is preserved as given. Supported roles per type are listed under Field roles.
Marks the field as the unique document identifier. Documents with matching primary keys overwrite existing documents. An index can have at most one primary key. Primary key fields must be required and cannot be multiple, locale-specific, or wildcard fields.
Default
false
requiredboolean
When true, the engine rejects documents that lack a value for this field.
Default
false
multipleboolean
When true, the field accepts multiple values in a single document. If false, the engine rejects documents containing multiple values for the field.
Default
false
storedboolean
When true, the engine stores field values to return in search results. This setting applies only when source is set to none, as documents are otherwise preserved in full.
Configures locale-specific field values so that analysis and collation follow the locale of each value. On an index that declares locales, configuring {} gives the field every declared locale, and only narrows the field to a subset of those locales.
Example
{
"defaultLocale": "sv",
"locales": [
"en",
"de"
]
}
4 properties
defaultLocalestring
Specifies the BCP-47 fallback locale for values that carry no explicit locale. On an index that declares locales, this property defaults to the defaultLocale of the index.
Example
"sv"
localesstring[]
Lists the supported locales for the field, in addition to the default locale. The engine rejects documents containing values with unlisted locales, and queries can target any listed locale. The engine rejects this property on an index that declares locales, which narrows a field with only instead. Reading an index definition back always returns this list on each field.
onlystring[]
Specifies the locales this field holds from the locales declared in index-level locales. If omitted, the field holds all declared locales. Every tag must be one the index declares, and the list must contain the default locale of the field. The engine expands this property into defaultLocale and locales before storing the index definition, so reading a definition back returns those properties instead.
fallbackFallback
Controls whether this field participates in the index's localeFallback. Only evaluated on an index that declares a fallback; setting enabled on an index without fallback configuration is rejected.
Represents structured object values containing nested field definitions, referenced by dot notation (such as variants.price). An object field cannot configure filter, sort, facet, locales, or stored on itself. Child fields can be objects in turn, though a nested array cannot contain another nested array. An array of objects can specify a key to identify each object value. Object fields are returned in search results through the preserved document source; a stored child field below single objects also answers when the index keeps none. See object.
primaryKeyboolean
Not supported on an object field; setting it is rejected.
requiredboolean
When true, the engine rejects documents that lack a value for this field.
Default
false
multipleboolean
When true, the field holds a list of object values, and mode is required. Single object fields are always indexed as flattened objects.
Default
false
storedboolean
Not supported on an object field; setting it is rejected.
Not supported on an object field; setting it is rejected.
Example
{
"defaultLocale": "sv",
"locales": [
"en",
"de"
]
}
4 properties
defaultLocalestring
Specifies the BCP-47 fallback locale for values that carry no explicit locale. On an index that declares locales, this property defaults to the defaultLocale of the index.
Example
"sv"
localesstring[]
Lists the supported locales for the field, in addition to the default locale. The engine rejects documents containing values with unlisted locales, and queries can target any listed locale. The engine rejects this property on an index that declares locales, which narrows a field with only instead. Reading an index definition back always returns this list on each field.
onlystring[]
Specifies the locales this field holds from the locales declared in index-level locales. If omitted, the field holds all declared locales. Every tag must be one the index declares, and the list must contain the default locale of the field. The engine expands this property into defaultLocale and locales before storing the index definition, so reading a definition back returns those properties instead.
fallbackFallback
Controls whether this field participates in the index's localeFallback. Only evaluated on an index that declares a fallback; setting enabled on an index without fallback configuration is rejected.
Not supported on an object field; setting it is rejected.
Example
{}
modeMode
Storage mode for multiple objects. Required when multiple is true (index:field:object:mode_required) and rejected when it is not (index:field:object:mode_without_multiple).
Values
"nested", "flattened"
keystring
Names a child field as the unique identifier for each object value in an array. Targets object values in update paths (such as variants[V-2]) and populates key on search value hits. Requires multiple: true (index:field:object:key_without_multiple). Must name a field defined in fields (index:field:object:key_unknown) that is required, not multiple, and of type string, int32, or int64 (index:field:object:key_invalid). Duplicate key values within a document are rejected with document:object_key_duplicate.
fieldsmap of FieldDefinition
Map of child field names to field definitions, the object type included - objects nest, though a nested array cannot contain another nested array (index:field:object:nested_in_nested). What a child field may configure follows from where it sits: sort and stored are rejected below a flattened array (index:field:object:flattened_sort_unsupported, index:field:object:flattened_stored_unsupported), and primaryKey is rejected inside any object (index:field:object:inner_usage_unsupported). Below a nested array stored and highlight work - highlighted fragments come back on value hits. locales works everywhere.
Definition of a field, structured as a tagged union where type selects the field type and the properties available on it. Field usages are opt-in: adding an empty configuration object enables a usage with engine defaults, and only explicitly configured properties are stored, preserving default values across engine updates. See Field types.
Example
{
"type": "string",
"stored": true,
"filter": {},
"matching": {
"highlight": {}
}
}
Endpoints
Endpoints where the request or responses uses this type.