We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b006aca commit db24182Copy full SHA for db24182
tests/rank_eval.yml
@@ -0,0 +1,29 @@
1
+---
2
+setup:
3
+ - do:
4
+ index:
5
+ index: "my-index-000001"
6
+ id: "doc1"
7
+ refresh: true
8
+ body: { text: 'travelling to Amsterdam' }
9
10
+teardown:
11
12
+ indices.delete: { index: "my-index-000001" }
13
14
+"rank eval":
15
16
+ rank_eval:
17
18
+ body:
19
+ requests:
20
+ - id: "amsterdam_query"
21
+ request: { query: { match: { text: "amsterdam" } } }
22
+ ratings:
23
+ - { "_index": "my-index-000001", "_id": "doc1", "rating": 0 }
24
+ - { "_index": "my-index-000001", "_id": "doc2", "rating": 3 }
25
+ - { "_index": "my-index-000001", "_id": "doc3", "rating": 1 }
26
+ metric:
27
+ precision:
28
+ k: 5
29
+ - match: { details.amsterdam_query.hits.0.hit._index: 'my-index-000001' }
0 commit comments