OpenSearch/rest-api-spec/test/explain/10_basic.yaml

66 lines
1.2 KiB
YAML
Raw Normal View History

2013-07-23 19:54:12 -04:00
---
"Basic explain":
2013-07-23 19:54:12 -04:00
- do:
index:
index: test_1
type: test
id: id_1
2013-07-23 19:54:12 -04:00
body: { foo: bar, title: howdy }
- do:
indices.refresh: {}
- do:
explain:
index: test_1
type: test
id: id_1
2013-07-23 19:54:12 -04:00
body:
query:
match_all: {}
2013-07-23 19:54:12 -04:00
- is_true: matched
2013-09-16 14:56:59 -04:00
- match: { explanation.value: 1 }
- match: { _index: test_1 }
- match: { _type: test }
- match: { _id: id_1 }
---
"Basic explain with alias":
- do:
indices.create:
index: test_1
body:
aliases:
alias_1: {}
- do:
cluster.health:
wait_for_status: yellow
- do:
index:
index: test_1
type: test
id: id_1
body: { foo: bar, title: howdy }
- do:
indices.refresh: {}
- do:
explain:
index: alias_1
type: test
id: id_1
body:
query:
match_all: {}
- is_true: matched
- match: { explanation.value: 1 }
- match: { _index: test_1 }
- match: { _type: test }
- match: { _id: id_1 }