Fix failing doc test, add missing CONSOLE

This commit is contained in:
Isabel Drost-Fromm 2016-11-17 15:01:04 +01:00
parent 19bb0a928d
commit e5a08937e3
1 changed files with 30 additions and 7 deletions

View File

@ -53,8 +53,8 @@ GET /index/type/_rank_eval
"_id": "30900421", "_id": "30900421",
"_index": "enwiki_rank" "_index": "enwiki_rank"
}], }],
"summary_fields": ["title"], <8> "summary_fields": ["title"] <8>
}, }],
"metric": { <9> "metric": { <9>
"reciprocal_rank": {} "reciprocal_rank": {}
} }
@ -87,7 +87,7 @@ GET /index/type/_rank_eval/template
"query": "{{query_string}}"}}}}}, <1> "query": "{{query_string}}"}}}}}, <1>
"requests": [ "requests": [
{ {
"id": "JFK query" "id": "JFK query",
"ratings": [ "ratings": [
{ {
"rating": 1.5, "rating": 1.5,
@ -100,11 +100,11 @@ GET /index/type/_rank_eval/template
"_type": "page", "_type": "page",
"_id": "30900421", "_id": "30900421",
"_index": "enwiki_rank" "_index": "enwiki_rank"
} ], }],
"params": { "params": {
"query_string": "JFK", <2> "query_string": "JFK", <2>
"wiki_field": "opening_text" <2> "wiki_field": "opening_text" <2>
}, }
}], }],
"metric": { "metric": {
"precision": { "precision": {
@ -135,7 +135,14 @@ one relevant result in position 1.
[source,js] [source,js]
-------------------------------- --------------------------------
GET /index/type/_rank_eval
{ {
"requests": [
{
"id": "JFK query",
"request": { "query": { "match_all": {}}},
"ratings": []
}],
"metric": { "metric": {
"precision": { "precision": {
"relevant_rating_threshold": 1, <1> "relevant_rating_threshold": 1, <1>
@ -144,6 +151,7 @@ one relevant result in position 1.
} }
} }
-------------------------------- --------------------------------
// CONSOLE
<1> For graded relevance ratings only ratings above this threshold are <1> For graded relevance ratings only ratings above this threshold are
considered as relevant results for the given query. By default this is set to 1. considered as relevant results for the given query. By default this is set to 1.
@ -161,13 +169,20 @@ in position 3 means Reciprocal Rank is going to be 1/3.
[source,js] [source,js]
-------------------------------- --------------------------------
GET /index/type/_rank_eval
{ {
"requests": [
{
"id": "JFK query",
"request": { "query": { "match_all": {}}},
"ratings": []
}],
"metric": { "metric": {
"reciprocal_rank": {} "reciprocal_rank": {}
} }
} }
-------------------------------- --------------------------------
// CONSOLE
=== Normalized discounted cumulative gain === Normalized discounted cumulative gain
@ -180,14 +195,22 @@ https://en.wikipedia.org/wiki/Discounted_cumulative_gain[Wikipedia].
[source,js] [source,js]
-------------------------------- --------------------------------
GET /index/type/_rank_eval
{ {
"requests": [
{
"id": "JFK query",
"request": { "query": { "match_all": {}}},
"ratings": []
}],
"metric": { "metric": {
"dcg": { "dcg": {
"normalize": "false" <1> "normalize": false <1>
} }
} }
} }
-------------------------------- --------------------------------
// CONSOLE
<1> Set to true to compute nDCG instead of DCG, default is false. <1> Set to true to compute nDCG instead of DCG, default is false.