London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Loading...

Locale parameter

This topic describes the locale parameter, part of the GraphQL API used for the Optimizely querying service, when retrieving content in Optimizely solutions.

How it works

When the locale parameter has been set in the GraphQL request, then the query will perform the following:

  1. Filter the content by routing to the specified language indices.
  2. Use linguistic processing of content when using the contains operator on a field. For example, the support tokenization of words, decompounding and stemming of these words.

    Example: Having values with "pommes, noisettes" will be stemmed to their (algorithmic) base form, so searching for singular forms will now also match contains: "pomme noisette".

The locale parameter takes a list of 1 or more languages as input. When locale has not been specified, then an index without any language processing will be used for matching. The locale parameter is directly related to the language_routing parameter.

Locale setting Indexing Searching
Without language_routing/locale parameter. Standard index Standard index
With language_routing/locale parameter Index each document to a separate index for each provided language. Search in separate index for each provided language. Besides the index filtering, language support for the full-text search operator contains for each provided language is enabled.

Related topics

Last updated: May 24, 2021