Fix failing doc test, add missing CONSOLE
This commit is contained in:
parent
19bb0a928d
commit
e5a08937e3
|
@ -53,8 +53,8 @@ GET /index/type/_rank_eval
|
|||
"_id": "30900421",
|
||||
"_index": "enwiki_rank"
|
||||
}],
|
||||
"summary_fields": ["title"], <8>
|
||||
},
|
||||
"summary_fields": ["title"] <8>
|
||||
}],
|
||||
"metric": { <9>
|
||||
"reciprocal_rank": {}
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ GET /index/type/_rank_eval/template
|
|||
"query": "{{query_string}}"}}}}}, <1>
|
||||
"requests": [
|
||||
{
|
||||
"id": "JFK query"
|
||||
"id": "JFK query",
|
||||
"ratings": [
|
||||
{
|
||||
"rating": 1.5,
|
||||
|
@ -100,11 +100,11 @@ GET /index/type/_rank_eval/template
|
|||
"_type": "page",
|
||||
"_id": "30900421",
|
||||
"_index": "enwiki_rank"
|
||||
} ],
|
||||
}],
|
||||
"params": {
|
||||
"query_string": "JFK", <2>
|
||||
"wiki_field": "opening_text" <2>
|
||||
},
|
||||
}
|
||||
}],
|
||||
"metric": {
|
||||
"precision": {
|
||||
|
@ -135,7 +135,14 @@ one relevant result in position 1.
|
|||
|
||||
[source,js]
|
||||
--------------------------------
|
||||
GET /index/type/_rank_eval
|
||||
{
|
||||
"requests": [
|
||||
{
|
||||
"id": "JFK query",
|
||||
"request": { "query": { "match_all": {}}},
|
||||
"ratings": []
|
||||
}],
|
||||
"metric": {
|
||||
"precision": {
|
||||
"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
|
||||
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]
|
||||
--------------------------------
|
||||
GET /index/type/_rank_eval
|
||||
{
|
||||
"requests": [
|
||||
{
|
||||
"id": "JFK query",
|
||||
"request": { "query": { "match_all": {}}},
|
||||
"ratings": []
|
||||
}],
|
||||
"metric": {
|
||||
"reciprocal_rank": {}
|
||||
}
|
||||
}
|
||||
--------------------------------
|
||||
|
||||
// CONSOLE
|
||||
|
||||
=== Normalized discounted cumulative gain
|
||||
|
||||
|
@ -180,14 +195,22 @@ https://en.wikipedia.org/wiki/Discounted_cumulative_gain[Wikipedia].
|
|||
|
||||
[source,js]
|
||||
--------------------------------
|
||||
GET /index/type/_rank_eval
|
||||
{
|
||||
"requests": [
|
||||
{
|
||||
"id": "JFK query",
|
||||
"request": { "query": { "match_all": {}}},
|
||||
"ratings": []
|
||||
}],
|
||||
"metric": {
|
||||
"dcg": {
|
||||
"normalize": "false" <1>
|
||||
"normalize": false <1>
|
||||
}
|
||||
}
|
||||
}
|
||||
--------------------------------
|
||||
// CONSOLE
|
||||
|
||||
<1> Set to true to compute nDCG instead of DCG, default is false.
|
||||
|
||||
|
|
Loading…
Reference in New Issue