Repository navigation
Conversation
…rch repository in find_context and search_company_context OpenSearchVectorService.getInstance() is null on Elasticsearch deployments, so both MCP tools returned nothing there. Both call sites only use methods declared on VectorIndexService, which SearchRepository exposes for either backend.
Code Review ✅ ApprovedFixes OptionsDisplay: 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 |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
❌ 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 |
Describe your changes:
Fixes #32546
AIContextFinder.searchKnowledgeandCompanyContextToolresolved the vector service throughOpenSearchVectorService.getInstance(), which is null on Elasticsearch deployments, sofind_contextandsearch_company_contextreturned nothing on Elasticsearch even with semantic search enabled and the entity vector index populated. Both call sites only use methods declared onVectorIndexService, so they now resolve the service throughEntity.getSearchRepository().getVectorIndexService(), asSemanticSearchToolalready does. No behaviour change on OpenSearch: the repository returns the sameOpenSearchVectorServiceinstance there.AIContextBuilderandGetEntityToolkeep the OpenSearch singleton because they needsearchChunksByParent, whichElasticSearchVectorServicedoes not implement.Type of change:
High-level design:
N/A, small change.
Tests:
Use cases covered
find_contextreturns approved glossary terms and their candidate assets for a business question.search_company_contextexecutes the vector query instead of reporting the service as uninitialised.Unit tests
AIContextFinderdo not depend on the singleton.Backend integration tests
Ingestion integration tests