Repository navigation
Fixes #37484: align ko glossary synonym mapping with its displayName - #37483
Conversation
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]>
❌ PR checklist incompleteThis 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 |
Code Review ✅ Approved 🔴 High riskAdding Korean analyzer and ngram fields changes the glossary-term index schema and requires reindexing; stale indexes could keep synonym search inconsistent. Aligns the Korean VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Fixes #37484
Describe your changes
#33456 asked for
synonymsto carry the same weight in practice as the boost it is given. #34052 answered it foren,ruandzh; this is thekohalf, filed as #37484.#34052 went through each locale's
glossary_termmapping and checked thesynonymsanalyzers against that locale'sdisplayName. It fixeden,ruandzh.kowas not included, and is still on the default:synonymsanalyzerdisplayNameanalyzersynonymssubfieldsenom_analyzerom_analyzerkeyword,ngramruom_analyzerom_analyzerkeyword,ngramzhik_max_word/ik_smartik_max_word/ik_smartkeyword,ngramkostandard)noriTwo things follow from that row:
The
synonyms.ngramboost points at a field that does not exist.GlossaryTermIndexboosts it at 1.0 andsearchSettings.jsondeclares it as a search field withmatchType: fuzzy, but the subfield is absent from thekomapping, 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 fornameanddisplayName, 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
kogets the shapezhalready has, with the Korean analyzer substituted for IK the same way #30831 did it —noriwherezhusesik_max_word/ik_smart, andom_ngramfor the ngram subfield:om_ngramis already defined in this file'ssettings.analysis, andindex.max_ngram_diffis already 17, so no settings change is needed. The resultingsynonyms.ngramis byte-identical tozh's.One file, +12 −1. No other locale is touched and no shipped default changes.
Reindex
glossary_term_search_indexneeds a reindex for this to take effect, as with #34052.IndexMappingVersionTrackerreportsglossaryTermas the only changed mapping, so the smart-reindex scope stays limited to that one index.Type of change
Checklist
Fixes <issue-number>: <short description>Tests
I did not add a regression test. The general invariant — every subfield a
*Indexboosts 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