From ca42bc03225292876a94a8aa8ffdfd788ea19a5e Mon Sep 17 00:00:00 2001 From: Andrei Stefan Date: Fri, 8 Aug 2025 17:41:42 +0300 Subject: [PATCH] Move the mapping update to a new index created upfront (#132581) (cherry picked from commit b5156fda7003cc1ff409c3e956a1fd6afaa40a6f) # Conflicts: # muted-tests.yml --- .../test/esql/40_unsupported_types.yml | 46 ++++++++++++------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/40_unsupported_types.yml b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/40_unsupported_types.yml index 8bae45df8ce08..9a49496866095 100644 --- a/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/40_unsupported_types.yml +++ b/x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/40_unsupported_types.yml @@ -108,6 +108,35 @@ setup: "some_doc": { "foo": "xy", "bar": 12 } } + - do: + indices.create: + index: test2 + body: + settings: + number_of_shards: 5 + mappings: + properties: + name: + type: keyword + nested: + type: nested + find_me: + type: long + + - do: + bulk: + index: test2 + refresh: true + body: + - { "index": { } } + - { + "find_me": 1, + "nested": { + "foo": 1, + "bar": "bar", + "baz": 1.9 + } + } --- unsupported: - requires: @@ -417,28 +446,13 @@ unsupported with sort: - match: { values.0.28: 3 } --- nested declared inline: - - do: - bulk: - index: test - refresh: true - body: - - { "index": { } } - - { - "find_me": 1, - "nested": { - "foo": 1, - "bar": "bar", - "baz": 1.9 - } - } - - do: allowed_warnings_regex: - "Field \\[.*\\] cannot be retrieved, it is unsupported or not indexed; returning null" - "No limit defined, adding default limit of \\[.*\\]" esql.query: body: - query: 'FROM test | WHERE find_me == 1 | KEEP n*' + query: 'FROM test2 | WHERE find_me == 1 | KEEP n*' # The `nested` field is not visible, nor are any of it's subfields. - match: { columns: [{name: name, type: keyword}] }