Repository navigation
Description
Is your feature request related to a problem? Please describe.
searchIndexMappingLanguage supports EN, JP, ZH and RU. Korean deployments have to fall back to EN, which indexes Korean text with om_analyzer — a standard tokenizer plus word_delimiter and kstem.
Korean writes compound nouns without spaces, so that analyzer produces a single opaque term:
POST /_analyze {"analyzer": "standard", "text": "주문상세내역"}
→ ["주문상세내역"] # one term: "order detail history"
POST /_analyze {"analyzer": "nori", "text": "주문상세내역"}
→ ["주문", "상세", "내역"] # order / detail / history
The same applies to particles and verb endings, which Korean attaches directly to the stem:
"회원의 가입" standard → ["회원의", "가입"] nori → ["회원", "가입"]
"검색하는 기능" standard → ["검색하는", "기능"] nori → ["검색", "기능"]
Because description is queried with operator: and, a user searching 회원의 가입 does not match a document containing 회원 가입 완료 이력 — the analyzer never reduces 회원의 to 회원. In practice free-text search over Korean descriptions does not work.
Describe the solution you'd like
Add KO to searchIndexMappingLanguage with an elasticsearch/ko/ mapping set, following the same shape the other non-English languages already use.
The zh pattern fits best: zh/ references the analysis plugin's built-in analyzer (ik_max_word / ik_smart) directly instead of hand-assembling one in settings.analysis. analysis-nori ships an equivalent built-in nori analyzer (nori_tokenizer + nori_part_of_speech + nori_readingform + lowercase), so ko/ can be derived from zh/ by substituting the analyzer name — same routed fields, same ngram settings, no Korean-specific policy to maintain.
nori has no max/smart split, so the ik_smart search_analyzer is simply dropped.
Describe alternatives you've considered
Hand-assembling om_analyzer_ko the way jp/ builds om_analyzer_jp from kuromoji_tokenizer plus filters. This works, but it means picking decompound_mode, part-of-speech filtering and stemming for Korean independently of what the plugin considers sensible — a policy this project would then have to carry. Referencing the built-in analyzer keeps ko/ mechanically derivable from zh/.
Additional context
analysis-nori has to be installed on the cluster, exactly as analysis-kuromoji is for JP and analysis-ik for ZH. On a stock OpenSearch 3.4.0 node with no analysis plugins, creating table_index_mapping gives:
| language | result |
|---|---|
EN |
200 |
JP |
400 — om_analyzer_jp failed to find tokenizer [kuromoji_tokenizer] |
ZH |
400 — analyzer [ik_smart] has not been configured |
So the requirement is not a new one. Only deployments that explicitly select the language are affected, EN stays plugin-free, and the failure is a loud 400 at index creation.
analysis-nori is an official Elasticsearch/OpenSearch bundled plugin and installs with opensearch-plugin install --batch analysis-nori, whereas analysis-ik is fetched from a third-party release URL in the integration-test image today.
SearchConsumerFieldBehaviorIT discovers languages from IndexMappingLanguage.values(), so the enum addition makes the suite exercise ko automatically once the test image installs the plugin.
I have this working with all 62 mappings verified against OpenSearch 3.4.0 and the integration test green, and would be happy to open a PR.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone ✅
Activity
Fixes open-metadata#30830: Add Korean (KO) search index mapping langu…