forked from opensearch-project/opensearch-api-specification
-
Notifications
You must be signed in to change notification settings - Fork 0
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
2 changed files
with
67 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
$schema: ../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test rank evaluation API using both GET and POST methods. | ||
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: Quentin Tarantino, title: Pulp Fiction, year: 1994} | ||
- {create: {_index: movies, _id: movie2}} | ||
- {director: Christopher Nolan, title: Inception, year: 2010} | ||
|
||
chapters: | ||
- synopsis: Perform rank evaluation using GET. | ||
path: /{index}/_rank_eval | ||
method: GET | ||
parameters: | ||
index: movies | ||
request: | ||
payload: | ||
metric: | ||
precision: | ||
k: 10 | ||
requests: | ||
- id: "query_1" | ||
Check failure on line 33 in tests/default/indices/rank_eval.yaml GitHub Actions / lint
|
||
request: | ||
query: | ||
match: | ||
title: "Pulp Fiction" | ||
Check failure on line 37 in tests/default/indices/rank_eval.yaml GitHub Actions / lint
|
||
ratings: | ||
- _id: "movie1" | ||
Check failure on line 39 in tests/default/indices/rank_eval.yaml GitHub Actions / lint
|
||
rating: 1 | ||
_index: movies | ||
response: | ||
status: 200 | ||
|
||
- synopsis: Perform rank evaluation using POST. | ||
path: /{index}/_rank_eval | ||
method: POST | ||
parameters: | ||
index: [movies] | ||
request: | ||
payload: | ||
metric: | ||
mean_reciprocal_rank: | ||
k: 10 | ||
requests: | ||
- id: "query_2" | ||
Check failure on line 56 in tests/default/indices/rank_eval.yaml GitHub Actions / lint
|
||
request: | ||
query: | ||
match: | ||
director: "Christopher Nolan" | ||
Check failure on line 60 in tests/default/indices/rank_eval.yaml GitHub Actions / lint
|
||
ratings: | ||
- _id: "movie2" | ||
_index: movies | ||
rating: 1 | ||
response: | ||
status: 200 |