-
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.
adding
rank_eval indices
API tests (#704)
* adding rank_eval indices api specs Signed-off-by: Tokesh <[email protected]> * lint for ci and verbose check early versions Signed-off-by: Tokesh <[email protected]> * adding _type parameter to rank-eval specs Signed-off-by: Tokesh <[email protected]> * fixing reference and adding changelog Signed-off-by: Tokesh <[email protected]> * adding rank_eval global Signed-off-by: Tokesh <[email protected]> * removing verbose flag from ci Signed-off-by: Tokesh <[email protected]> * missing one link in changelog Signed-off-by: Tokesh <[email protected]> --------- Signed-off-by: Tokesh <[email protected]> Signed-off-by: Niyazbek Torekeldi <[email protected]>
- Loading branch information
Showing
4 changed files
with
134 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
$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: /_rank_eval | ||
method: GET | ||
request: | ||
payload: | ||
metric: | ||
precision: | ||
k: 10 | ||
requests: | ||
- id: query_1 | ||
request: | ||
query: | ||
match: | ||
title: Pulp Fiction | ||
ratings: | ||
- _id: movie1 | ||
rating: 1 | ||
_index: movies | ||
response: | ||
status: 200 | ||
|
||
- synopsis: Perform rank evaluation using POST. | ||
path: /_rank_eval | ||
method: POST | ||
request: | ||
payload: | ||
metric: | ||
mean_reciprocal_rank: | ||
k: 10 | ||
requests: | ||
- id: query_2 | ||
request: | ||
query: | ||
match: | ||
director: Christopher Nolan | ||
ratings: | ||
- _id: movie2 | ||
_index: movies | ||
rating: 1 | ||
response: | ||
status: 200 |
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 | ||
request: | ||
query: | ||
match: | ||
title: Pulp Fiction | ||
ratings: | ||
- _id: movie1 | ||
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 | ||
request: | ||
query: | ||
match: | ||
director: Christopher Nolan | ||
ratings: | ||
- _id: movie2 | ||
_index: movies | ||
rating: 1 | ||
response: | ||
status: 200 |