From d85f1004000114bd10da695533c493b869c81203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20C=C3=B4t=C3=A9?= Date: Thu, 5 Dec 2019 08:17:36 -0500 Subject: [PATCH] Remove index pattern requirement when doing a nested query in KQL (#52023) (#52223) --- src/plugins/data/common/es_query/kuery/functions/nested.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/plugins/data/common/es_query/kuery/functions/nested.js b/src/plugins/data/common/es_query/kuery/functions/nested.js index 6237189e1631..d1de09b977f6 100644 --- a/src/plugins/data/common/es_query/kuery/functions/nested.js +++ b/src/plugins/data/common/es_query/kuery/functions/nested.js @@ -28,10 +28,6 @@ export function buildNodeParams(path, child) { } export function toElasticsearchQuery(node, indexPattern, config, context = {}) { - if (!indexPattern) { - throw new Error('Cannot use nested queries without an index pattern'); - } - const [path, child] = node.arguments; const stringPath = ast.toElasticsearchQuery(path); const fullPath = context.nested && context.nested.path ? `${context.nested.path}.${stringPath}` : stringPath;