javanna 6d3bcc4451 Java API: add index, type and id to ExplainResponse
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
2014-08-08 12:52:03 +02:00

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 }