-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More tests, fixes ExplanationDetail/value. (#685)
* Added tests for PUT /{index}/_block/{block}. Signed-off-by: dblock <dblock@amazon.com> * Added tests for PUT /{index}/_clone/{target}. Signed-off-by: dblock <dblock@amazon.com> * Added tests for GET and POST /{index}/_explain/{id}. Signed-off-by: dblock <dblock@amazon.com> --------- Signed-off-by: dblock <dblock@amazon.com>
- Loading branch information
Showing
6 changed files
with
82 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
$schema: ../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test limiting certain operations on a specified index. | ||
prologues: | ||
- path: /movies | ||
method: PUT | ||
epilogues: | ||
- path: /movies | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Disable any write operations made to the index. | ||
path: /{index}/_block/{block} | ||
method: PUT | ||
parameters: | ||
index: movies | ||
block: write | ||
response: | ||
status: 200 | ||
payload: | ||
shards_acknowledged: true | ||
acknowledged: true | ||
indices: | ||
- name: movies | ||
blocked: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
$schema: ../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test getting an explanation of how the relevance score is calculated for every result. | ||
epilogues: | ||
- path: /movies | ||
method: DELETE | ||
status: [200, 404] | ||
prologues: | ||
- path: /_bulk | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
content_type: application/x-ndjson | ||
payload: | ||
- {create: {_index: movies, _id: movie1}} | ||
- {director: Bennett Miller, title: The Cruise, year: 1998} | ||
- {create: {_index: movies, _id: movie2}} | ||
- {director: Nicolas Winding Refn, title: Drive, year: 1960} | ||
chapters: | ||
- synopsis: Explain the score for a match query (GET). | ||
path: /{index}/_explain/{id} | ||
method: GET | ||
parameters: | ||
index: movies | ||
id: movie1 | ||
request: | ||
payload: | ||
query: | ||
match: | ||
year: 1998 | ||
response: | ||
status: 200 | ||
- synopsis: Explain the score for a match query (POST). | ||
path: /{index}/_explain/{id} | ||
method: POST | ||
parameters: | ||
index: movies | ||
id: movie2 | ||
preference: _local | ||
routing: primary | ||
_source: true | ||
_source_excludes: title | ||
_source_includes: director | ||
request: | ||
payload: | ||
query: | ||
match: | ||
title: Drive | ||
response: | ||
status: 200 |