-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
Signed-off-by: Tokesh <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
$schema: ../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test _termvectors and _msearch/template APIs. | ||
prologues: | ||
- path: /_bulk | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
content_type: application/x-ndjson | ||
payload: | ||
- {create: {_index: books, _id: book1}} | ||
- {author: "Harper Lee", title: "To Kill a Mockingbird", year: 1960} | ||
Check failure on line 13 in tests/default/indices/msearch_template.yaml GitHub Actions / lint
Check failure on line 13 in tests/default/indices/msearch_template.yaml GitHub Actions / lint
Check failure on line 13 in tests/default/indices/msearch_template.yaml GitHub Actions / lint
|
||
- {create: {_index: books, _id: book2}} | ||
- {author: "Elizabeth Rudnick", title: "Beauty and the Beast", year: 1991} | ||
Check failure on line 15 in tests/default/indices/msearch_template.yaml GitHub Actions / lint
Check failure on line 15 in tests/default/indices/msearch_template.yaml GitHub Actions / lint
Check failure on line 15 in tests/default/indices/msearch_template.yaml GitHub Actions / lint
|
||
- {create: {_index: books, _id: book3}} | ||
- {author: "George Orwell", title: "1984", year: 1949} | ||
Check failure on line 17 in tests/default/indices/msearch_template.yaml GitHub Actions / lint
|
||
epilogues: | ||
- path: /books | ||
method: DELETE | ||
status: [200, 404] | ||
|
||
chapters: | ||
- synopsis: Perform a multi-search template query using a GET request. | ||
path: /{index}/_msearch/template | ||
parameters: | ||
index: books | ||
method: GET | ||
request: | ||
content_type: application/x-ndjson | ||
payload: | ||
- {index: books} | ||
- {source: '{"query": {"match": {"title": "{{title}}"}}}', params: {title: "Mockingbird"}} | ||
- {index: books} | ||
- {source: '{"query": {"match": {"title": "{{title}}"}}}', params: {title: "Beast"}} | ||
response: | ||
status: 200 | ||
- synopsis: Perform a multi-search template query using a POST request. | ||
path: /{index}/_msearch/template | ||
parameters: | ||
index: books | ||
method: POST | ||
request: | ||
content_type: application/x-ndjson | ||
payload: | ||
- {index: books} | ||
- {source: '{"query": {"match": {"title": "{{title}}"}}}', params: {title: "1984"}} | ||
- {index: books} | ||
- {source: '{"query": {"match": {"author": "{{author}}"}}}', params: {author: "Harper Lee"}} | ||
response: | ||
status: 200 |