Skip to content

Korean glossary synonyms is indexed with the default analyzer and has no ngram subfield #37484

Done

Description

@kyun6318

Affected module

Search / Discovery

Describe the bug

#34052 went through each locale's glossary_term mapping and checked the synonyms analyzers against that locale's displayName, fixing en, ru and zh. ko was not part of that pass and still carries the pre-#34052 shape:

locale synonyms analyzer displayName analyzer synonyms subfields
en om_analyzer om_analyzer keyword, ngram
ru om_analyzer om_analyzer keyword, ngram
zh ik_max_word / ik_smart ik_max_word / ik_smart keyword, ngram
ko none → standard nori none

openmetadata-spec/src/main/resources/elasticsearch/ko/glossary_term_index_mapping.json:

"synonyms": {
  "type": "text"
}

Two consequences:

synonyms.ngram is boosted but does not exist. GlossaryTermIndex puts it in the query fields at 1.0, and searchSettings.json declares it as a search field with matchType: fuzzy:

https://github.com/open-metadata/OpenMetadata/blob/main/openmetadata-service/src/main/java/org/openmetadata/service/search/indexes/GlossaryTermIndex.java#L63-L64

The subfield is absent from the ko mapping, so that leg of the query contributes nothing when the server runs with ELASTICSEARCH_INDEX_MAPPING_LANG=KO.

Korean synonyms are not segmented. standard splits on whitespace and punctuation only, so a synonym entered as 회원의 가입 is indexed with the particle attached and searching 회원 가입 does not match it. nori segments both to 회원 + 가입. This is the gap #30831 closed for name, displayName and description; synonyms was the one field it did not reach, since at that time every locale had {"type": "text"} there.

To Reproduce

  1. Run the server with ELASTICSEARCH_INDEX_MAPPING_LANG=KO and analysis-nori installed.
  2. Create a glossary term with synonym 회원의 가입.
  3. Search 회원 가입. The term is not returned, although the equivalent text in displayName is found.

The mapping side can be checked without a server:

GET glossary_term_search_index/_mapping
→ properties.synonyms = {"type": "text"}      # no analyzer, no fields

Expected behavior

ko synonyms matches its own displayName, the way the other four locales do after #34052 — nori as the analyzer, plus the keyword and om_ngram subfields that make the declared boosts resolve. om_ngram and index.max_ngram_diff are already defined in that file, so only the field definition needs to change.

OpenMetadata version

main at 18dd898 (2026-11-10).

Additional context

Found while re-reading the ko mappings after #30831 merged, against the state #34052 left. jp synonyms also has no analyzer, so it is in the same position for a different reason — I have not touched it here.

A fix needs a reindex of glossary_term_search_index, as #34052 did. IndexMappingVersionTracker reports glossaryTerm as the only changed mapping, so the smart-reindex scope stays on that one index.

PR follows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status
      Done ✅

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions