From c9ecfd9636cd9f08ae660fc879e9be508af63ac9 Mon Sep 17 00:00:00 2001 From: Zhongnan Su Date: Mon, 3 Oct 2022 10:34:06 -0700 Subject: [PATCH] [MD] Fix view single document issue by updating low-level search call param (#2431) * Add datasource param to low-level search call in Discover * update change log Signed-off-by: Su Signed-off-by: Sergey V. Osipov --- CHANGELOG.md | 1 + .../application/components/doc/use_opensearch_doc_search.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 20ef14a29294..9f10fcbddfb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) * [Vis Builder] Fixes auto bounds for timeseries bar chart visualization ([2401](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2401)) * [Vis Builder] Fixes visualization shift when editing agg ([2401](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2401)) * [Vis Builder] Renames "Histogram" to "Bar" in vis type picker ([2401](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2401)) +* [MD] Add data source param to low-level search call in Discover ([#2431](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2431)) ### 🚞 Infrastructure diff --git a/src/plugins/discover/public/application/components/doc/use_opensearch_doc_search.ts b/src/plugins/discover/public/application/components/doc/use_opensearch_doc_search.ts index 8d1aa123e43d..b5ca9fec1c2f 100644 --- a/src/plugins/discover/public/application/components/doc/use_opensearch_doc_search.ts +++ b/src/plugins/discover/public/application/components/doc/use_opensearch_doc_search.ts @@ -82,6 +82,7 @@ export function useOpenSearchDocSearch({ const { rawResponse } = await getServices() .data.search.search({ + dataSourceId: indexPatternEntity.dataSourceRef?.id, params: { index, body: buildSearchBody(id, indexPatternEntity),