Skip to content

Fixes #37484: align ko glossary synonym mapping with its displayName - #37483

Merged
sonika-shah merged 2 commits into
open-metadata:mainfrom
kyun6318:fix/ko-glossary-synonyms
Dec 1, 2026
Merged

sonika-shah merged 2 commits into
open-metadata:mainfrom
kyun6318:fix/ko-glossary-synonyms

Conversation

@kyun6318

@kyun6318 kyun6318 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #37484

Describe your changes

#33456 asked for synonyms to carry the same weight in practice as the boost it is given. #34052 answered it for en, ru and zh; this is the ko half, filed as #37484.

#34052 went through each locale's glossary_term mapping and checked the synonyms analyzers against that locale's displayName. It fixed en, ru and zh. ko was not included, and is still on the default:

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 — (falls back to standard) nori — none

Two things follow from that row:

The synonyms.ngram boost points at a field that does not exist. GlossaryTermIndex boosts it at 1.0 and searchSettings.json declares it as a search field with matchType: fuzzy, but the subfield is absent from the ko mapping, so that leg of the query matches nothing.

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

Korean synonyms are not segmented. With standard, a synonym entered as 회원의 가입 is indexed as two tokens carrying the particle, so searching 회원 가입 does not match it — the same gap #30831 closed for name and displayName, still open on this one field. This is what #33456 described: "synonym matching ends up weaker than name matching despite carrying a higher boost."

Change

ko gets the shape zh already has, with the Korean analyzer substituted for IK the same way #30831 did it — nori where zh uses ik_max_word/ik_smart, and om_ngram for the ngram subfield:

"synonyms": {
  "type": "text",
  "analyzer": "nori",
  "fields": {
    "keyword": { "type": "keyword", "ignore_above": 256 },
    "ngram": { "type": "text", "analyzer": "om_ngram" }
  }
}

om_ngram is already defined in this file's settings.analysis, and index.max_ngram_diff is already 17, so no settings change is needed. The resulting synonyms.ngram is byte-identical to zh's.

One file, +12 −1. No other locale is touched and no shipped default changes.

Reindex

glossary_term_search_index needs a reindex for this to take effect, as with #34052. IndexMappingVersionTracker reports glossaryTerm as the only changed mapping, so the smart-reindex scope stays limited to that one index.

Type of change

  • Bug fix

Checklist

  • I have read the CONTRIBUTING document.
  • My PR title is in the format Fixes <issue-number>: <short description>

Tests

mvn test -pl openmetadata-service -Dtest='IndexAnalyzerMappingTest,IndexMappingNestedFieldConsistencyTest,\
IndexMappingVersionTrackerTest,DataProductIndexMappingTest,AvailableEntityTypesConsistencyTest,\
SearchIndexMappingLanguageConfigTest'

Tests run: 45, Failures: 0, Errors: 0, Skipped: 0

I did not add a regression test. The general invariant — every subfield a *Index boosts exists in every locale's mapping — currently fails in more places than this one field, so asserting it here would either fail the build or have to be narrowed to a one-off check of the kind that was dropped from #34052 during review (test(search): drop the one-off glossary synonym mapping test). Happy to add either shape if you'd prefer one.

🤖 Generated with Claude Code

open-metadata#34052 checked each locale's `synonyms` analyzers against its `displayName`
and fixed en, ru and zh. ko was left on the default `standard` analyzer with
no subfields, so two things are broken there:

- `GlossaryTermIndex` boosts `synonyms.ngram` at 1.0 and `searchSettings.json`
  declares it as a search field, but the subfield does not exist in the ko
  mapping, so that leg of the query matches nothing.
- `synonyms` itself is indexed with `standard`, so Korean synonyms are not
  segmented. A synonym written as "회원의 가입" is not found by searching
  "회원 가입", which is the gap open-metadata#30831 closed everywhere except this field.

This gives ko the same shape zh already has, substituting the Korean analyzer
for IK the same way open-metadata#30831 did: `nori` where zh uses `ik_max_word`/`ik_smart`,
and `om_ngram` for the ngram subfield, which is already defined in this file.

Requires a reindex of `glossary_term_search_index` to take effect.
`IndexMappingVersionTracker` reports glossaryTerm as the only changed mapping.

Co-Authored-By: Claude Opus 5 <[email protected]>
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@kyun6318 kyun6318 changed the title Fixes #33456: align ko glossary synonym mapping with its displayName Fixes #37484: align ko glossary synonym mapping with its displayName Nov 10, 2026
@sonika-shah sonika-shah added the safe to test Add this label to run secure Github workflows on PRs label Dec 1, 2026
@sonika-shah
sonika-shah enabled auto-merge (squash) December 1, 2026 06:54
@gitar-bot

gitar-bot Bot commented Dec 1, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🔴 High risk

Adding Korean analyzer and ngram fields changes the glossary-term index schema and requires reindexing; stale indexes could keep synonym search inconsistent.

Aligns the Korean glossary_term synonyms mapping with its displayName by switching to the nori analyzer and adding the keyword and om_ngram subfields that zh already has, so Korean synonyms are segmented and the synonyms.ngram boost resolves. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@sonika-shah
sonika-shah merged commit f41c141 into open-metadata:main Dec 1, 2026
18 of 19 checks passed
@kyun6318
kyun6318 deleted the fix/ko-glossary-synonyms branch December 1, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants