-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added msearch template tests Signed-off-by: Tokesh <tokesh789@gmail.com> * lint fix Signed-off-by: Tokesh <tokesh789@gmail.com> * added core msearch template tests Signed-off-by: Tokesh <tokesh789@gmail.com> * added msearch get tests Signed-off-by: Tokesh <tokesh789@gmail.com> * renaming folders, using multiple methods, deleting default code Signed-off-by: Tokesh <tokesh789@gmail.com> --------- Signed-off-by: Tokesh <tokesh789@gmail.com> Signed-off-by: Niyazbek Torekeldi <78027392+Tokesh@users.noreply.github.com>
- Loading branch information
Showing
6 changed files
with
86 additions
and
39 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,35 @@ | ||
$schema: ../../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test _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 | ||
- POST | ||
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}} |
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,37 @@ | ||
$schema: ../../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test _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: /{index}/_msearch/template | ||
parameters: | ||
index: books | ||
method: | ||
- GET | ||
- POST | ||
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}} |