-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
Signed-off-by: dblock <dblock@amazon.com>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
$schema: ../../../../../json_schemas/test_story.schema.yaml | ||
|
||
description: |- | ||
Test the creation of a search pipeline with a response processor. | ||
version: '>= 2.8' | ||
prologues: | ||
- path: /movies/_doc/1 | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
payload: | ||
name: "Drive" | ||
Check failure on line 13 in tests/default/_core/search/pipeline/rename_field.yaml GitHub Actions / lint
|
||
status: [201] | ||
epilogues: | ||
- path: /_search/pipeline/names_pipeline | ||
method: DELETE | ||
status: [200, 404] | ||
- path: /movies | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Create search pipeline. | ||
path: /_search/pipeline/{id} | ||
method: PUT | ||
parameters: | ||
id: names_pipeline | ||
request: | ||
payload: | ||
response_processors: | ||
- rename_field: | ||
field: name | ||
target_field: title | ||
response: | ||
status: 200 | ||
payload: | ||
acknowledged: true | ||
- synopsis: Query created pipeline. | ||
path: /_search/pipeline/{id} | ||
method: GET | ||
parameters: | ||
id: names_pipeline | ||
response: | ||
status: 200 | ||
- synopsis: Search. | ||
path: /{index}/_search | ||
method: GET | ||
parameters: | ||
index: movies | ||
search_pipeline: names_pipeline | ||
response: | ||
status: 200 | ||
payload: | ||
hits: | ||
total: | ||
value: 1 | ||
hits: | ||
- _index: movies | ||
_source: | ||
title: Drive |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
$schema: ../../../../../json_schemas/test_story.schema.yaml | ||
|
||
description: |- | ||
Test the creation of a search pipeline with a response processor. | ||
version: '>= 2.16' | ||
prologues: | ||
- path: /movies/_doc/1 | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
payload: | ||
names: ["Drive", "1984", "Moneyball"] | ||
Check failure on line 13 in tests/default/_core/search/pipeline/sort.yaml GitHub Actions / lint
Check failure on line 13 in tests/default/_core/search/pipeline/sort.yaml GitHub Actions / lint
Check failure on line 13 in tests/default/_core/search/pipeline/sort.yaml GitHub Actions / lint
Check failure on line 13 in tests/default/_core/search/pipeline/sort.yaml GitHub Actions / lint
Check failure on line 13 in tests/default/_core/search/pipeline/sort.yaml GitHub Actions / lint
|
||
status: [201] | ||
epilogues: | ||
- path: /_search/pipeline/names_pipeline | ||
method: DELETE | ||
status: [200, 404] | ||
- path: /movies | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Create search pipeline. | ||
path: /_search/pipeline/{id} | ||
method: PUT | ||
parameters: | ||
id: names_pipeline | ||
request: | ||
payload: | ||
response_processors: | ||
- sort: | ||
field: names | ||
order: asc | ||
target_field: sorted_names | ||
response: | ||
status: 200 | ||
payload: | ||
acknowledged: true | ||
- synopsis: Query created pipeline. | ||
path: /_search/pipeline/{id} | ||
method: GET | ||
parameters: | ||
id: names_pipeline | ||
response: | ||
status: 200 | ||
- synopsis: Search. | ||
path: /{index}/_search | ||
method: GET | ||
parameters: | ||
index: movies | ||
search_pipeline: names_pipeline | ||
response: | ||
status: 200 | ||
payload: | ||
hits: | ||
total: | ||
value: 1 | ||
hits: | ||
- _index: movies | ||
_source: | ||
names: | ||
- Drive | ||
- '1984' | ||
- Moneyball | ||
sorted_names: | ||
- '1984' | ||
- Drive | ||
- Moneyball |