From 7102989c3373563bae9c64a6283865f5a76a6808 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Tue, 30 Jan 2024 16:26:24 -0800 Subject: [PATCH] [OSCI][FIX] Discover: Fix the Subfields Display Issue (#5429) (#5741) * set flattenHit() deep param as true to allow iterate on nested object --------- (cherry picked from commit 40ba1f51602e82e6a9539431e339706c7b564b83) Signed-off-by: qiwen li Signed-off-by: Qiwen Li Signed-off-by: Miki Signed-off-by: Anan Zhuang Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] Co-authored-by: Miki Co-authored-by: Anan Zhuang --- .../data/common/index_patterns/index_patterns/flatten_hit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/data/common/index_patterns/index_patterns/flatten_hit.ts b/src/plugins/data/common/index_patterns/index_patterns/flatten_hit.ts index 63dc3eb453dd..73ace5e41a05 100644 --- a/src/plugins/data/common/index_patterns/index_patterns/flatten_hit.ts +++ b/src/plugins/data/common/index_patterns/index_patterns/flatten_hit.ts @@ -112,7 +112,7 @@ export function flattenHitWrapper( metaFields = {}, cache = new WeakMap() ) { - return function cachedFlatten(hit: Record, deep = false) { + return function cachedFlatten(hit: Record, deep = true) { const decorateFlattened = decorateFlattenedWrapper(hit, metaFields); const cached = cache.get(hit); const flattened = cached || flattenHit(indexPattern, hit, deep);