Repository navigation
[2.0] Partially addresses #34954: expand nested glossary search matches in the term picker (UI only) - #34955
Conversation
…cestors - TreeAsyncSelectList: expand every level of the search results, not only the glossary roots, so a match nested under parent terms is visible. - Search managers (ES + OS): a getHierarchy page can rank a hit's ancestors below the size cut, orphaning the hit. Fetch the missing ancestors by FQN before building the tree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
❌ 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 |
The ancestor backfill ran a bare terms query, so an Approved term under a Draft/In Review/Rejected parent pulled that parent into the picker. Apply the same entityStatus=Approved gate buildHierarchyQuery uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Parent-term clauses added for the hierarchy scored like real matches. In large glossaries the fqnParts aggregation hits its 1000-bucket cap, some matches lose their own-FQN clause, and parents can take page slots from them. Score the parent clauses 0 for glossary terms: matches rank purely by relevance, parents fill any leftover slots, and the ones that don't fit are backfilled by addMissingAncestors. Domain search is unchanged.
The hierarchy-ancestor fix in ElasticSearchSearchManager/OpenSearchSearchManager lands separately on main and gets cherry-picked to 2.0. This PR keeps only the TreeAsyncSelectList change, which is client-side and independent of it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Code Review ✅ Approved 1 closed / 1 findings🟡 Medium risk · Expanding every nested search result in the term picker could render large hierarchies at once and make selection harder to navigate. Glossary term picker search now expands every level of matching results so nested terms are visible and selectable, and the backend backfills missing ancestor terms so glossaries no longer come back empty when a search matches more terms than one page. The ancestor backfill now respects the Approved-status filter, addressing the resolved finding. No open issues found. ✅ 1 closed✅ Bug: Ancestor backfill skips the entityStatus=Approved filter
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledOptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|



Describe your changes:
Partially addresses #34954 — UI half only. The backend half is handled separately on
mainby @sonikashah and will be cherry-picked to 2.0.Searching in the glossary term picker didn't let users select a term nested under other terms. There were two causes, one in the UI and one in the backend; this PR carries only the UI one.
Matches stayed collapsed. The search response already carries the full path to each match, but
TreeAsyncSelectList'sonSearchexpanded only the top-level results (the glossaries). A match under "Customer" sat collapsed until the user expanded every level by hand.findExpandableKeysForArrayhelper fromGlossaryPureUtils. Search still makes a single API call.This change is purely client-side: it only changes what the component does with the response it already receives, so it needs no backend change to be correct and can merge independently.
Not in this PR (backend, tracked separately): with
getHierarchy=trueand more matches than one page,buildHierarchyQueryranks matches and their ancestor terms together, the ancestors get cut, andbuildGlossaryTermSearchHierarchythen drops every match — each glossary comes back aschildren: []. Until that lands, the many-matches case stays broken regardless of this PR; the common few-matches case is fixed here.Screen.Recording.2026-10-08.at.8.45.05.PM.mov
Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
Unit tests
TreeAsyncSelectList.test.tsx: new test. It searches, returnsBusiness › Customer › Churn, and asserts the level-3 node renders. It fails without the fix and passes with it.Backend integration tests
Ingestion integration tests
Manual testing performed
Seeded a local 2.0.5 server (Elasticsearch 9.3) with the sample data plus 25 glossaries × 27 approved terms nested 5 levels deep, and ran the picker's request (
size=25&getHierarchy=true):SalesMetrics(2 matches)Checklist:
Fixes <issue-number>: <short explanation>🤖 Generated with Claude Code