Skip to content

Fixes 578 - Add NLQ Search to Marketplace Search Bar#28112

Merged
shrabantipaul-collate merged 4 commits into
mainfrom
feature/marketplace-nlq-search
May 15, 2026
Merged

Fixes 578 - Add NLQ Search to Marketplace Search Bar#28112
shrabantipaul-collate merged 4 commits into
mainfrom
feature/marketplace-nlq-search

Conversation

@shrabantipaul-collate
Copy link
Copy Markdown
Contributor

@shrabantipaul-collate shrabantipaul-collate commented May 14, 2026

Add NLQ Search to Marketplace Search Bar

MarketplaceSearchBar - Added a Natural Language Query (NLQ) toggle button inside the search input, matching the style of the global search bar's NLQ icon. The toggle is independent of the global search bar state - each has its own on/off state.

NLQ flow — When the toggle is active and NLP is enabled on the backend, the search calls nlqSearch with index=marketplace (the Elasticsearch alias covering both domain and dataProduct indexes). Results are split by entityType into data products and domains. Falls back to regular keyword search if NLQ is unavailable.
image

Fixes https://github.com/open-metadata/ai-platform/issues/578

I worked on ... because ...

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

High-level design:

N/A — small change.

Tests:

Use cases covered

Unit tests

Backend integration tests

Ingestion integration tests

Playwright (UI) tests

Manual testing performed

UI screen recording / screenshots:

Not applicable.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • For UI changes: I attached a screen recording and/or screenshots above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

Summary by Gitar

  • UI adjustments:
    • Disabled isNLPEnabled state by default in MarketplaceSearchBar component to prevent premature NLQ activation.

This will update automatically on new commits.

@shrabantipaul-collate shrabantipaul-collate requested a review from a team as a code owner May 14, 2026 11:52
@shrabantipaul-collate shrabantipaul-collate added the safe to test Add this label to run secure Github workflows on PRs label May 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 62%
62.62% (64841/103544) 43.33% (35330/81534) 46.15% (10400/22534)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

🟡 Playwright Results — all passed (17 flaky)

✅ 4053 passed · ❌ 0 failed · 🟡 17 flaky · ⏭️ 103 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 298 0 1 4
🟡 Shard 2 743 0 7 25
🟡 Shard 3 781 0 3 7
🟡 Shard 4 789 0 1 18
🟡 Shard 5 708 0 1 41
🟡 Shard 6 734 0 4 8
🟡 17 flaky test(s) (passed on retry)
  • Pages/AuditLogs.spec.ts › should apply both User and EntityType filters simultaneously (shard 1, 2 retries)
  • Features/BulkEditEntity.spec.ts › Glossary (shard 2, 1 retry)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should display correct status badge color and icon (shard 2, 2 retries)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should start term as Draft when glossary has reviewers (shard 2, 1 retry)
  • Features/KnowledgeCenterList.spec.ts › Knowledge Center List - Test infinite scroll/pagination (shard 2, 1 retry)
  • Features/KnowledgeCenterTextEditor.spec.ts › Rich Text Editor - Text Formatting (shard 2, 1 retry)
  • Features/KnowledgeCenterTextEditor.spec.ts › Rich Text Editor - Text Formatting (shard 2, 1 retry)
  • Features/KnowledgeCenterTextEditor.spec.ts › Rich Text Editor - Text Formatting (shard 2, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Flow/IngestionBot.spec.ts › Ingestion bot should be able to access domain specific domain (shard 3, 1 retry)
  • Flow/PersonaFlow.spec.ts › Set default persona for team should work properly (shard 3, 1 retry)
  • Pages/Entity.spec.ts › Glossary Term Add, Update and Remove for child entities (shard 4, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard 5, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › Column lineage for dashboard -> mlModel (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify Impact Analysis service filter selection (shard 6, 1 retry)
  • Pages/ODCSImportExport.spec.ts › Multi-object ODCS contract - object selector shows all schema objects (shard 6, 1 retry)
  • Pages/ServiceEntity.spec.ts › Announcement create, edit & delete (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented May 15, 2026

Code Review ✅ Approved 1 resolved / 1 findings

Integrates NLQ search into the Marketplace search bar with independent toggle state. The default NLP state has been disabled to prevent premature search failures.

✅ 1 resolved
Bug: isNLPEnabled defaults to true, may cause failed NLQ searches

📄 openmetadata-ui/src/main/resources/ui/src/components/DataMarketplace/MarketplaceSearchBar/MarketplaceSearchBar.component.tsx:49 📄 openmetadata-ui/src/main/resources/ui/src/components/DataMarketplace/MarketplaceSearchBar/MarketplaceSearchBar.component.tsx:59-63
The state isNLPEnabled is initialized to true (line 49) before the getNLPEnabledStatus() API call resolves. If a user activates the NLQ toggle and types a query before the status check completes (or if the network is slow), the component will call nlqSearch even when the backend doesn't support NLQ.

While the catch block handles API errors gracefully (showing empty results), this is still a misleading UX: the toggle appears enabled and functional, then silently fails. The safer default is false, showing the regular search icon until NLP support is confirmed.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link
Copy Markdown

Comment on lines +78 to +80
pageNumber: INITIAL_PAGING_VALUE,
pageSize: PAGE_SIZE * 2,
searchIndex: SearchIndex.MARKETPLACE,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we not using pagination on this endpoint yet?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a suggestions dropdown, not a paginated list page, we just want just the top results.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We always fetch the first page to get enough items to split between data products and domains.
Image

@shrabantipaul-collate shrabantipaul-collate merged commit b98f899 into main May 15, 2026
60 checks passed
@shrabantipaul-collate shrabantipaul-collate deleted the feature/marketplace-nlq-search branch May 15, 2026 09:53
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.

3 participants