From 84289de74483e605ab127795b6c1a2ab135b7c17 Mon Sep 17 00:00:00 2001 From: Honza Kral Date: Mon, 15 Jul 2013 14:43:27 +0200 Subject: [PATCH] Add basic tests for put mapping --- .../test/indices.put_mapping/10_basic.yaml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 rest-api-spec/test/indices.put_mapping/10_basic.yaml diff --git a/rest-api-spec/test/indices.put_mapping/10_basic.yaml b/rest-api-spec/test/indices.put_mapping/10_basic.yaml new file mode 100644 index 00000000000..4d094be71f7 --- /dev/null +++ b/rest-api-spec/test/indices.put_mapping/10_basic.yaml @@ -0,0 +1,49 @@ +--- +"Test Create and update mapping": + - do: + indices.create: + index: test_index + + - do: + indices.put_mapping: + index: test_index + type: test_type + body: + test_type: + properties: + text: + type: string + analyzer: whitespace + + - do: + indices.get_mapping: + index: test_index + type: test_type + + - match: {test_type.properties.text.type: string} + - match: {test_type.properties.text.analyzer: whitespace} + + - do: + indices.put_mapping: + index: test_index + type: test_type + body: + test_type: + properties: + text: + type: multi_field + fields: + text: + type: string + analyzer: whitespace + text_raw: + type: string + index: not_analyzed + + - do: + indices.get_mapping: + index: test_index + type: test_type + + - match: {test_type.properties.text.type: multi_field} + - match: {test_type.properties.text.fields.text_raw.index: not_analyzed}