summaryrefslogtreecommitdiff
path: root/rest-api-spec/test/search/20_default_values.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'rest-api-spec/test/search/20_default_values.yaml')
-rw-r--r--rest-api-spec/test/search/20_default_values.yaml43
1 files changed, 43 insertions, 0 deletions
diff --git a/rest-api-spec/test/search/20_default_values.yaml b/rest-api-spec/test/search/20_default_values.yaml
new file mode 100644
index 0000000..e8f1434
--- /dev/null
+++ b/rest-api-spec/test/search/20_default_values.yaml
@@ -0,0 +1,43 @@
+---
+"Default index":
+ - do:
+ indices.create:
+ index: test_2
+ - do:
+ indices.create:
+ index: test_1
+ - do:
+ index:
+ index: test_1
+ type: test
+ id: 1
+ body: { foo: bar }
+
+ - do:
+ index:
+ index: test_2
+ type: test
+ id: 42
+ body: { foo: bar }
+
+ - do:
+ indices.refresh:
+ index: [test_1, test_2]
+
+ - do:
+ search:
+ index: _all
+ type: test
+ body:
+ query:
+ match:
+ foo: bar
+
+ - match: {hits.total: 2}
+ - match: {hits.hits.0._index: test_1 }
+ - match: {hits.hits.0._type: test }
+ - match: {hits.hits.0._id: "1" }
+
+ - match: {hits.hits.1._index: test_2 }
+ - match: {hits.hits.1._type: test }
+ - match: {hits.hits.1._id: "42" }