summaryrefslogtreecommitdiff
path: root/rest-api-spec/test/indices.create/10_basic.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'rest-api-spec/test/indices.create/10_basic.yaml')
-rw-r--r--rest-api-spec/test/indices.create/10_basic.yaml85
1 files changed, 85 insertions, 0 deletions
diff --git a/rest-api-spec/test/indices.create/10_basic.yaml b/rest-api-spec/test/indices.create/10_basic.yaml
new file mode 100644
index 0000000..2cb979b
--- /dev/null
+++ b/rest-api-spec/test/indices.create/10_basic.yaml
@@ -0,0 +1,85 @@
+---
+"Create index with mappings":
+
+ - do:
+ indices.create:
+ index: test_index
+ body:
+ mappings:
+ type_1: {}
+
+ - do:
+ indices.get_mapping:
+ index: test_index
+
+ - match: { test_index.mappings.type_1.properties: {}}
+
+---
+"Create index with settings":
+
+ - do:
+ indices.create:
+ index: test_index
+ body:
+ settings:
+ number_of_replicas: "0"
+
+ - do:
+ indices.get_settings:
+ index: test_index
+
+ - match: { test_index.settings.index.number_of_replicas: "0"}
+
+---
+"Create index with warmers":
+
+ - do:
+ indices.create:
+ index: test_index
+ body:
+ warmers:
+ test_warmer:
+ source:
+ query:
+ match_all: {}
+
+ - do:
+ indices.get_warmer:
+ index: test_index
+
+ - match: {test_index.warmers.test_warmer.source.query.match_all: {}}
+
+---
+"Create index with mappings, settings and warmers":
+
+ - do:
+ indices.create:
+ index: test_index
+ body:
+ mappings:
+ type_1: {}
+ settings:
+ number_of_replicas: "0"
+ warmers:
+ test_warmer:
+ source:
+ query:
+ match_all: {}
+
+ - do:
+ indices.get_mapping:
+ index: test_index
+
+ - match: { test_index.mappings.type_1.properties: {}}
+
+ - do:
+ indices.get_settings:
+ index: test_index
+
+ - match: { test_index.settings.index.number_of_replicas: "0"}
+
+ - do:
+ indices.get_warmer:
+ index: test_index
+
+ - match: { test_index.warmers.test_warmer.source.query.match_all: {}}