Configuring OpenSearch language analyzers for multilingual search starts with the languages your users actually query
Start by listing the languages your users actually type into the search box, then map each one to an OpenSearch analyzer before you write any index mapping. A language analyzer is a text analysis chain that decides how content is split into tokens, normalized and stemmed, both when documents are indexed and when queries are run. Those decisions determine whether a German compound noun, a Japanese sentence without spaces or a Turkish suffixed word will match the term a user searches for. Teams need language analyzers as soon as their content or queries are in more than one language, or when a single English analyzer would treat other languages as noise. The OpenSearch documentation lists language analyzers for Arabic, Chinese, Japanese and Korean (CJK), English, French, German, Hindi, Japanese Kuromoji, Spanish, Thai, Turkish and Ukrainian, plus an ICU analyzer. All OpenSearch software is licensed under the Apache License, Version 2.0, and the OpenSearch FAQ describes no paid edition, so these analyzers carry no additional license cost. Your cost is the engineering and testing effort, not a fee for the feature.
The first design decision is whether each language gets its own field or whether all text goes into one field. Per-language fields, such as a title_de and title_en pair, let each field use the analyzer that fits its language and keep stemming rules from interfering with each other. A single field with an ICU analyzer is simpler to query and maintain, but it gives up language-specific stemming and stop words. Mixed-language content, such as product pages that quote English terms inside a German sentence, often needs both: a per-language field for relevance and a multilingual fallback field for recall. Confirm the language of each document at ingestion, because a wrong language tag quietly applies the wrong stemmer. For Japanese, decide early between the CJK analyzer and Kuromoji, since they segment text differently and the choice affects index size and match quality.
Test analysis output before you tune relevance. The _analyze API shows the exact tokens an analyzer produces for a sample string, so run it on real queries from your logs for every language, including the awkward cases such as compounds, diacritics and mixed scripts. Record the expected tokens in a test set and rerun it whenever an analyzer or plugin version changes. Plugin dependencies also need checking: some analyzers rely on plugins that must be installed on every node, so confirm the exact package and version set with the OpenSearch documentation for your release before you roll it out. Plan a reindex for any mapping change, because analyzers apply at index time and existing documents keep their old tokens. Ask your implementation partner to include this test set and reindex runbook in the written scope, since they determine how much retesting each later change will cost.
Which analyzer option fits which language mix
This table compares the built-in language analyzers, the ICU analyzer, the CJK analyzer and Kuromoji by language coverage, typical use, token behavior and what to confirm. Read each row against the languages your index must serve, then use the last column to plan a test before you commit a mapping. The main takeaway is that the right option depends on the script and word boundaries of each language, not on a single default for the whole index.
| Option | Language coverage | Typical use | What it does to tokens | What to confirm |
|---|---|---|---|---|
| Built-in language analyzer (per language) | Arabic, English, French, German, Hindi, Spanish, Thai, Turkish, Ukrainian and others in the docs list | One field per language with stemming and stopwords for that language | Splits on word boundaries, removes stopwords and applies the language's stemming rules | The exact analyzer name and its filters in your OpenSearch version, and whether stopword lists suit your content |
| ICU analyzer | Broad multilingual coverage based on Unicode text segmentation | Mixed-language content in one field where no single language dominates | Normalizes Unicode and segments text by Unicode rules, with folding options for accents and case | Which ICU plugin pieces ship in your image or package, and how folding affects matches users expect |
| CJK analyzer | Chinese, Japanese and Korean (CJK) | Chinese, Japanese or Korean text where words are not separated by spaces | Generates overlapping bigrams from CJK characters so partial words can match | Index size growth from bigrams and whether recall without segmentation is acceptable for your queries |
| Kuromoji analyzer | Japanese | Japanese product, article or support content that needs dictionary-based word splitting | Segments Japanese into words using a dictionary and applies Japanese-specific normalization | Dictionary version, custom user dictionary needs and how brand names and new terms are segmented |
| Single field with ICU or a language analyzer | One field across several languages | Small catalogs or content where per-language fields are not yet justified | Mixes tokenization rules, so stemming may fire for the wrong language | Test queries in every language on real content before accepting relevance results |
| Per-language fields | Each language gets its own analyzed field | Sites that serve distinct locales with different stemming and stopwords | Each field uses its own analyzer, and queries target the field for the user's locale | Query routing logic, index size and how fallback works when a document lacks a translation |
How tokenizers, filters and stemmers change what a query matches
The analyzer decides which terms exist in the index, so it decides what a query can match. An analyzer is a pipeline with three stages: character filters that normalize the raw text, a tokenizer that splits it into tokens, and token filters that lowercase, remove stopwords, fold accents or stem each token. Whatever comes out of that pipeline is the vocabulary the index stores. A word that the pipeline turns into run at index time can only be found by a query that also reduces to run. Before you tune any language setting, export the analyzer output for a sample of real documents and real queries, so you can see the stored tokens rather than guessing at them.
The same analyzer must run at index time and at query time. If the indexed text is stemmed to one form and the query is left unstemmed, or the query uses a different stopword list, the two sides no longer share a vocabulary and relevant documents silently drop out. The mismatch often looks like a relevance problem when it is really a configuration problem. Language analyzers also differ in what they do: stemming rules, stopword lists and the handling of case and accents vary by language, so a field that suits English can miss German compound words or Turkish suffixes. Check each language field with test queries that have known matches, and confirm the analyzer settings for each language against the OpenSearch language analyzers documentation for your OpenSearch version.
Per-language fields or one shared field: how to decide
When a website or application serves a small, known set of languages, each document usually has one language and the content team can state it. A separate field per language (for example, a title_en and a title_de field, each using its own language analyzer) keeps stemming and stopwords correct for each language and lets you tune boosts per market. Queries are routed by the user's locale, so a German visitor searches the German fields, with the English fields as an optional fallback.
- Mapping: one field per language per searchable attribute, each with the matching built-in language analyzer, plus an unanalyzed or keyword copy where exact matches matter.
- Query routing: a multi_match across the locale's fields, or a
dis_maxquery that prefers the locale field and falls back to others. - Relevance: each language field scores terms with its own stemming, so results are tuned per market, but a term shared across languages is scored separately in each field.
- Index size: every language field stores its own terms, so index size grows roughly with the number of languages and fields, which is predictable for a fixed set.
- Test: index a sample document in each language with
_analyzeand confirm stems, stopwords and boosts for each locale before you commit to the field list.
Before you choose, confirm the complete list of languages and whether new markets are likely, since adding a language later means a new field and a reindex.
A product catalog often holds one record whose title and description mix languages, for example an English product name with a French description and Japanese specifications. Per-language fields then become awkward, because a single document does not belong to one language. A shared field analyzed with a multilingual approach, such as the ICU analyzer for mixed scripts, or a field per attribute that is not tied to a language, avoids guessing which analyzer applies to the whole record. The trade-off is weaker stemming in exchange for predictable behavior across mixed content.
- Mapping: one shared text field per attribute using the ICU analyzer, with a separate keyword field for exact codes, SKUs and brand names.
- Query routing: a single query across the shared field, with no language switch in the application layer.
- Relevance: stemming is limited because one analyzer cannot stem every language correctly, so rely more on exact and phrase matches and on synonyms managed per field.
- Index size: one field per attribute keeps the index smaller than a per-language layout, but query tuning matters more.
- Test: run representative mixed records through
_analyze, then compare recall for sample queries in each language against a per-language baseline.
Confirm with your catalog owners which attributes truly mix languages, since many can be split by language at ingest instead.
Some applications, such as support tickets, user-generated posts or document repositories, receive content without a reliable language label. The application can run language detection at ingest and write the result to a language field. The index can then use per-language fields for records whose language is detected with confidence, and a shared fallback field for the rest. Detection errors matter here, because a wrongly tagged record is analyzed with the wrong stemmer and becomes hard to find.
- Mapping: a
languagekeyword field, per-language fields for detected languages, and a shared fallback field for low-confidence or unknown records. - Query routing: search the fallback field always, and add the matching language fields when the user's query or locale suggests a language.
- Relevance: the fallback field keeps records findable even when detection fails, though those records get less precise matching.
- Index size: sparse per-language fields keep unused languages out of most documents, but the mapping still grows with each field you define.
- Test: build a labeled sample of records, measure detection accuracy by language, and check search results for short texts, code-mixed text and transliterated names.
Confirm which detection method and confidence threshold your team will use, and who reviews records that fall back.
How to configure and test language analyzers on a new index
This sequence takes a team from a list of languages and content to an index whose analyzers have been inspected token by token, exercised with representative queries and checked by people who use the search. Each step ends with a check so problems surface before launch rather than in production.
Inventory languages and content
The search owner and a content lead list every language the site or application stores, the share of documents in each language, and which fields hold text users search, such as titles, body copy, product names and tags. Record mixed-language documents, transliterated names and any CJK or Thai text, because these decide whether a language-specific analyzer or the ICU analyzer fits. The step is complete when the team has a written table of language, field and document count that covers every indexed field. Confirm exact counts with a sample export from your own data, not from estimates.
Pick an analyzer for each field
For each language and field pair, choose a built-in language analyzer from the OpenSearch language analyzer list, the ICU analyzer for multilingual or mixed-script fields, or the Kuromoji option for Japanese, and decide whether a field needs a standard analyzer for exact or identifier matching. Check the analyzer's documented token filters and stop word behavior against the content you inventoried, and confirm that your OpenSearch version documents the analyzer you choose. The output is an analyzer decision per field, with a note on any language that has no dedicated analyzer.
Define index settings and mappings
Write the index settings that declare custom analyzers and filters, then write mappings that bind each field to its analyzer, using one field per language (for example, a title field for English and another for German) or one field with a multilingual analyzer, as the inventory decided. Keep the definition in version-controlled files and create the index in a non-production cluster through the REST API or Dashboards Dev Tools. The check is that the index creation call returns successfully and that
GETon the mapping shows each field with the analyzer you intended.Load representative sample documents
Load a sample of real documents covering every language, every field and the edge cases from step one, including mixed-language records, accented characters, compound words, and CJK or Thai text without spaces. Use the bulk API so each language's documents are indexed through the same pipeline that production will use. The check is a document count that matches the sample file and a spot-check of a few stored documents to confirm that each language field holds the text expected.
Inspect tokens with the analyze API
Call the
_analyzeAPI in Dashboards Dev Tools for each field and each analyzer, using sample strings from the inventory. Compare the emitted tokens with what a native speaker expects: stemmed forms, removed stop words, correct segmentation of Japanese or Chinese text, and folded diacritics where you configured them. Run the same strings against the index-time analyzer, because a query-time analyzer that differs from it causes silent misses. The step closes when every sample string produces the token set you wrote down, and any mismatch is logged with the fix applied.Run representative queries
Write a query set of common searches per language, including inflected forms, singular and plural, accented and unaccented spellings, mixed-language terms and product codes, then run each one against the index with the search API and record the top results and total hits. Check that a query in one language does not return unrelated documents from another because of shared tokens, and that exact-match fields still return exact matches. The check is a written result list for each query, reviewed by someone who reads the language, with failing queries traced back to a specific analyzer or field.
Validate results with real users
Ask a small group of native speakers from each language community to run their own searches against the test index and mark whether the results are relevant. Review their feedback against the query set, adjust analyzers or field boosts where a pattern repeats, and rerun steps four through six after each change so the test record stays current. The step is complete when each language group signs off on its query set and the team has recorded the analyzer configuration that passed. Confirm the review process and sign-off owners with your product and content teams before testing begins.
Security and operations for multilingual analyzers
Multilingual indices often hold user-generated text in several languages, and the analyzer chain decides how that text is stored and searched. The controls below cover who can read that content, how it moves over the network, how changes are recorded, and how an analyzer change is carried out safely across the cluster.
Restrict who reads user content
Create roles on the OpenSearch Security plugin that grant read access only to the indices and fields a team needs. Use field-level security or field masking on columns such as customer names, addresses or support messages, so a search role for a storefront does not expose the raw text that a support team holds. Check that each role is tested with a real query, because a role that can search an index can often reconstruct content through highlighted snippets unless highlighting is also restricted.
Security docsLimit document visibility by tenant
When one cluster serves several markets or customers, use document-level security so each role only matches the documents that belong to it, for example by a language or tenant_id field. Confirm that analyzed fields do not leak terms across that boundary through aggregations or suggestions, which can reveal vocabulary even when documents are hidden. Test with a user from each market and compare the hit counts and terms returned.
Encrypt client traffic with TLS
Enable TLS for client traffic as well as node-to-node traffic, so search requests from applications and admin tools are encrypted in transit. Multilingual queries often carry personal names and free text, so plaintext transport exposes that content on internal networks. Confirm the certificate chain used by application clients, the handling of certificate rotation, and which ports are reachable from each network segment.
Security docsAudit index and mapping changes
Turn on audit logging so that index creation, mapping updates and settings changes are recorded with the user who made them. An analyzer is defined in index settings, so an unplanned change to a filter or tokenizer alters how every language is indexed. Review audit records after each change window and keep them in a store that the search team cannot edit.
Security docsPlan reindexing as an operational event
A change to an analyzer does not apply to documents that are already indexed, so the affected fields must be rebuilt into a new index. Plan this as a release with a named owner, a test cluster run, a rollback path that keeps the old index until search results are checked, and a window in which applications read from the correct alias. Confirm how much write traffic arrives during the rebuild and whether writes must be buffered or replayed.
Check upgrade impact on analyzers
Before a cluster upgrade, confirm that the language analyzers and plugins used by your indices are available in the target version and that their behavior has not changed for your languages. Run the same analysis test set on both versions and compare tokens. Record the result alongside the upgrade plan, because token changes can alter relevance without any error being raised.
Migrate or upgrade docsQuestions teams ask before configuring multilingual analyzers
What does a multilingual analyzer project cost, and what drives the effort?
The main cost is skilled time spent on analysis design, testing and tuning, not the analyzers themselves, which ship with OpenSearch under the Apache License, Version 2.0. Effort rises with the number of languages, the mix of scripts (Latin, CJK, Arabic, Thai and others), how much mixed-language content your data contains, and how many fields need language-specific handling. Ask any partner for a quote tied to a written scope listing languages, fields and test cases, and separate one-time build work from any recurring tuning or retainer support.
How long does a language rollout take?
Duration depends mostly on how many languages you add, how clean your sample content is, and whether relevance is measured before and after the change. A single language with one clear field is a short exercise, while several languages with CJK segmentation or mixed-script content need more analysis and review cycles. Confirm the timeline in writing with whoever does the work, and ask what is included in testing and what happens if the first analyzer choice underperforms.
What must our team provide before the work starts?
Most of the input comes from your business and search data rather than from the cluster. Prepare:
- The list of languages and locales you must support, with priority order
- Representative sample documents and product or content records in each language
- Recent search query logs, including misspellings and mixed-language queries
- Known terms that must not be stemmed or split, such as brand names and product codes
- Who signs off on relevance decisions for each market
Without query logs, analyzer choices are harder to justify.
Can an internal team configure multilingual analyzers alone?
Yes, if the team has experience with Lucene-based analysis, can read analyzer output and has native speakers available to review results. The OpenSearch language analyzers and the ICU analyzer are documented, so the core configuration is within reach of a capable platform team. The harder part is judging relevance across languages, which often needs people who understand each market. Decide early who owns the test set, and confirm that your team has time to maintain it after launch.
How do analyzer changes affect existing indices?
An analyzer change does not rewrite documents already in an index. Analysis happens at index time for text fields, so existing data keeps the tokens it was indexed with until you reindex it. Plan a new index with the updated mapping, reindex the content, and switch an alias once results match your tests. Keep the old index until the cutover is verified, and confirm that your reindex window and cluster capacity can handle the document volume. Query-time analyzers can sometimes change without reindexing, but test that carefully.
Should we use one field per language or one shared field?
Use per-language fields when languages need different stemming, stopword or segmentation behavior, which is common when Japanese, Thai or Arabic sit beside Latin-script languages. A single shared field is simpler to query and maintain, but it applies one analysis chain to all text and can hurt recall or precision in some languages. Many teams combine both, keeping a shared field for mixed content and language fields for targeted matching. Measure both options against your query logs before committing.
What risks should we check before going live?
The most common issues are over-stemming that merges unrelated words, CJK text that is segmented poorly, mixed-script queries that return nothing, and index growth from extra n-gram or duplicate fields. Check analyzer output on sample text with the _analyze API before indexing, and run a fixed set of relevance queries across every language. Confirm with your security and compliance owners that the sample data used in testing is handled under your data rules.
How a multilingual query flows through analyzers and fields
The diagram starts with a document arriving at the index and with a user query arriving at the search API. Both pass through the same analyzer chain for the field they target, so the tokens they produce can match. The routing step decides whether a document lands in a per-language field or a shared field, and that choice determines which analyzer runs. Before shipping, run the analyze API against sample text in each language to confirm the tokens look as expected.
Documents and queries share an analyzer chain, so matching depends on the field each one targets.
How DeployOpen works on this
DeployOpen plans, implements, tests and documents multilingual analysis on OpenSearch inside your own infrastructure, so the language settings are reviewed against your actual content and query logs before they reach production. Each engagement starts with a written scope that names the languages, fields and test cases involved.
How we scope
- Inventory the languages, scripts and mixed-language content your indexed documents and user queries actually contain
- Agree in writing which analyzers, fields and index settings are in scope, with fixed deliverables and timelines
- Define test queries and expected token output for each language before any index mapping is changed
- Confirm where the cluster runs, who owns the mappings and how changes will be reviewed and approved
How we build
- Design per-language fields or a shared field with multi-fields, based on how your queries mix languages
- Configure built-in language analyzers, the ICU analyzer or the Kuromoji analyzer where the target language calls for them
- Test analysis output with the
_analyzeAPI on representative samples and record the results for each language - Keep index templates and analyzer settings in version control so each change can be reviewed and rolled back
How we hand over
- Deliver mapping files, analyzer definitions, test queries and the expected analysis output as documented artifacts
- Walk your search and platform engineers through how to add a language and how to re-test after an analyzer change
- Document reindexing steps, because changing an analyzer usually requires building a new index and switching to it
- Record the OpenSearch version and plugin set the configuration was tested against, so upgrades can be planned
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, scoped in writing
- Retesting after OpenSearch version upgrades, since analyzer behavior and plugin availability can change between releases
- Review of new languages or content sources before they are added to the production index
- Confirm support terms, response expectations and retainer scope with DeployOpen before work starts

