Skip to content

REST API

Locales

Configures locale-specific field values. On an index that declares locales, configuring {} gives the field every declared locale, and only narrows the field to a subset of those locales. See Localize fields.

Example

{
"defaultLocale": "sv",
"locales": [
"en",
"de"
]
}

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.
Default
"enabled"
Values
"enabled", "disabled"

Endpoints

Endpoints where the request or responses uses this type.

Other types

Types that reference this one.

Exofind is built by Level Four AB and is available under the Apache License 2.0.