2014-06-10 11:35:49 -04:00
|
|
|
---
|
2014-06-18 11:51:10 -04:00
|
|
|
setup:
|
|
|
|
- do:
|
|
|
|
indices.create:
|
|
|
|
index: test1
|
|
|
|
body:
|
|
|
|
settings:
|
|
|
|
number_of_shards: 5
|
|
|
|
number_of_replicas: 1
|
2014-06-10 11:35:49 -04:00
|
|
|
|
2014-06-18 11:51:10 -04:00
|
|
|
- do:
|
|
|
|
indices.create:
|
|
|
|
index: test2
|
|
|
|
body:
|
|
|
|
settings:
|
|
|
|
number_of_shards: 4
|
|
|
|
number_of_replicas: 1
|
|
|
|
- do:
|
|
|
|
index:
|
|
|
|
index: test1
|
|
|
|
type: bar
|
|
|
|
id: 1
|
|
|
|
body: { "foo": "bar" }
|
2014-06-10 11:35:49 -04:00
|
|
|
|
2014-06-18 11:51:10 -04:00
|
|
|
- do:
|
|
|
|
index:
|
|
|
|
index: test2
|
|
|
|
type: baz
|
|
|
|
id: 1
|
|
|
|
body: { "foo": "baz" }
|
2014-06-10 11:35:49 -04:00
|
|
|
|
|
|
|
---
|
|
|
|
"Index - blank":
|
|
|
|
- do:
|
|
|
|
indices.stats: {}
|
|
|
|
|
|
|
|
- match: { _shards.total: 18 }
|
|
|
|
- is_true: _all
|
|
|
|
- is_true: indices.test1
|
|
|
|
- is_true: indices.test2
|
|
|
|
|
|
|
|
---
|
|
|
|
"Index - all":
|
|
|
|
- do:
|
|
|
|
indices.stats: { index: _all }
|
|
|
|
|
|
|
|
- match: { _shards.total: 18 }
|
|
|
|
- is_true: _all
|
|
|
|
- is_true: indices.test1
|
|
|
|
- is_true: indices.test2
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
"Index - star":
|
|
|
|
- do:
|
|
|
|
indices.stats: { index: '*' }
|
|
|
|
|
|
|
|
- match: { _shards.total: 18 }
|
|
|
|
- is_true: _all
|
|
|
|
- is_true: indices.test1
|
|
|
|
- is_true: indices.test2
|
|
|
|
|
|
|
|
---
|
|
|
|
"Index - one index":
|
|
|
|
- do:
|
|
|
|
indices.stats: { index: 'test1' }
|
|
|
|
|
|
|
|
- match: { _shards.total: 10 }
|
|
|
|
- is_true: _all
|
|
|
|
- is_true: indices.test1
|
|
|
|
- is_false: indices.test2
|
|
|
|
|
|
|
|
---
|
|
|
|
"Index - multi-index":
|
|
|
|
- do:
|
|
|
|
indices.stats: { index: [test1, test2] }
|
|
|
|
|
|
|
|
- match: { _shards.total: 18 }
|
|
|
|
- is_true: _all
|
|
|
|
- is_true: indices.test1
|
|
|
|
- is_true: indices.test2
|
|
|
|
|
|
|
|
---
|
|
|
|
"Index - pattern":
|
|
|
|
- do:
|
|
|
|
indices.stats: { index: '*2' }
|
|
|
|
|
|
|
|
- match: { _shards.total: 8 }
|
|
|
|
- is_true: _all
|
|
|
|
- is_false: indices.test1
|
|
|
|
- is_true: indices.test2
|
|
|
|
|