mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-05 20:48:22 +00:00
216c814a7f
If a type or path is missing in the REST test yaml file, it is automatically replaced with _all. This makes it hard to test changes in the api, for example adding the possibility to leave the index blank in addition to _all and * in the uri. closes #4657
44 lines
848 B
YAML
44 lines
848 B
YAML
---
|
|
"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" }
|