mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-07 21:48:39 +00:00
Index, type and id were returned as part of the REST explain api response, but not through java api. That info was read out of the request, relying on the fact that the index would get overridden with the concrete one within that same request. Closes #7201
66 lines
1.2 KiB
YAML
66 lines
1.2 KiB
YAML
---
|
|
"Basic explain":
|
|
- do:
|
|
index:
|
|
index: test_1
|
|
type: test
|
|
id: id_1
|
|
body: { foo: bar, title: howdy }
|
|
|
|
- do:
|
|
indices.refresh: {}
|
|
|
|
- do:
|
|
explain:
|
|
index: test_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 }
|
|
|
|
---
|
|
"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 }
|
|
|