-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tokesh <[email protected]>
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
$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} | ||
- {create: {_index: books, _id: book2}} | ||
- {author: Elizabeth Rudnick, title: Beauty and the Beast, year: 1991} | ||
- {create: {_index: books, _id: book3}} | ||
- {author: George Orwell, title: '1984', year: 1949} | ||
epilogues: | ||
- path: /books | ||
method: DELETE | ||
status: [200, 404] | ||
|
||
chapters: | ||
- synopsis: Perform a multi-search template query using a GET request. | ||
path: /_msearch/template | ||
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: /_msearch/template | ||
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 |