|
81 | 81 |
|
82 | 82 | - match: { hits.total.value: 2 } |
83 | 83 | - match: { hits.hits.0._id: "1" } |
84 | | - - match: { hits.hits.0._score: 5.0 } |
| 84 | + - close_to: { hits.hits.0._score: { value: 5.0, error: 0.001} } |
85 | 85 | - match: { hits.hits.1._id: "4" } |
86 | | - - match: { hits.hits.1._score: 2.0 } |
| 86 | + - close_to: { hits.hits.1._score: { value: 2.0, error: 0.001} } |
87 | 87 |
|
88 | 88 | --- |
89 | 89 | "basic linear weighted combination - interleaved results": |
@@ -174,13 +174,13 @@ setup: |
174 | 174 |
|
175 | 175 | - match: { hits.total.value: 4 } |
176 | 176 | - match: { hits.hits.0._id: "1" } |
177 | | - - match: { hits.hits.0._score: 20.0 } |
| 177 | + - close_to: { hits.hits.0._score: { value: 20.0, error: 0.001} } |
178 | 178 | - match: { hits.hits.1._id: "3" } |
179 | | - - match: { hits.hits.1._score: 15.0 } |
| 179 | + - close_to: { hits.hits.1._score: { value: 15.0, error: 0.001} } |
180 | 180 | - match: { hits.hits.2._id: "4" } |
181 | | - - match: { hits.hits.2._score: 12.0 } |
| 181 | + - close_to: { hits.hits.2._score: { value: 12.0, error: 0.001} } |
182 | 182 | - match: { hits.hits.3._id: "2" } |
183 | | - - match: { hits.hits.3._score: 10.0 } |
| 183 | + - close_to: { hits.hits.3._score: { value: 10.0, error: 0.001} } |
184 | 184 |
|
185 | 185 | --- |
186 | 186 | "should normalize initial scores": |
@@ -256,12 +256,11 @@ setup: |
256 | 256 |
|
257 | 257 | - match: { hits.total.value: 4 } |
258 | 258 | - match: { hits.hits.0._id: "1" } |
259 | | - - match: {hits.hits.0._score: 10.0} |
| 259 | + - close_to: { hits.hits.0._score: { value: 10.0, error: 0.001} } |
260 | 260 | - match: { hits.hits.1._id: "2" } |
261 | | - - match: {hits.hits.1._score: 8.0} |
| 261 | + - close_to: { hits.hits.1._score: { value: 8.0, error: 0.001} } |
262 | 262 | - match: { hits.hits.2._id: "4" } |
263 | | - - match: {hits.hits.2._score: 2.0} |
264 | | - - match: { hits.hits.2._score: 2.0 } |
| 263 | + - close_to: { hits.hits.2._score: { value: 2.0, error: 0.001} } |
265 | 264 | - match: { hits.hits.3._id: "3" } |
266 | 265 | - close_to: { hits.hits.3._score: { value: 0.0, error: 0.001 } } |
267 | 266 |
|
@@ -310,13 +309,13 @@ setup: |
310 | 309 |
|
311 | 310 | - match: { hits.total.value: 4 } |
312 | 311 | - match: { hits.hits.0._id: "2" } |
313 | | - - match: { hits.hits.0._score: 8.0 } |
| 312 | + - close_to: { hits.hits.0._score: { value: 8.0, error: 0.001} } |
314 | 313 | - match: { hits.hits.1._id: "1" } |
315 | | - - match: { hits.hits.1._score: 6.0 } |
| 314 | + - close_to: { hits.hits.1._score: { value: 6.0, error: 0.001} } |
316 | 315 | - match: { hits.hits.2._id: "4" } |
317 | 316 | - close_to: { hits.hits.2._score: { value: 1.6, error: 0.001 } } |
318 | 317 | - match: { hits.hits.3._id: "3" } |
319 | | - - match: { hits.hits.3._score: 1.2 } |
| 318 | + - close_to: { hits.hits.3._score: { value: 1.2, error: 0.001} } |
320 | 319 |
|
321 | 320 | --- |
322 | 321 | "should handle all zero scores in normalization": |
@@ -514,7 +513,7 @@ setup: |
514 | 513 | - match: { hits.total.value: 4 } |
515 | 514 | - length: { hits.hits: 1 } |
516 | 515 | - match: { hits.hits.0._id: "4" } |
517 | | - - match: { hits.hits.0._score: 2.0 } |
| 516 | + - close_to: { hits.hits.0._score: { value: 2.0, error: 0.001} } |
518 | 517 |
|
519 | 518 | - do: |
520 | 519 | search: |
@@ -703,9 +702,9 @@ setup: |
703 | 702 |
|
704 | 703 | - match: { hits.total.value: 4 } |
705 | 704 | - match: { hits.hits.0._id: "4" } |
706 | | - - match: { hits.hits.0._score: 2.0 } |
| 705 | + - close_to: { hits.hits.0._score: { value: 2.0, error: 0.001} } |
707 | 706 | - match: { hits.hits.1._id: "1" } |
708 | | - - match: { hits.hits.1._score: 1.0 } |
| 707 | + - close_to: { hits.hits.1._score: { value: 1.0, error: 0.001} } |
709 | 708 |
|
710 | 709 | --- |
711 | 710 | "explain should provide info on weights and inner retrievers": |
@@ -908,11 +907,11 @@ setup: |
908 | 907 |
|
909 | 908 | - match: { hits.total.value: 3 } |
910 | 909 | - match: { hits.hits.0._id: "2" } |
911 | | - - match: { hits.hits.0._score: 40.0 } |
| 910 | + - close_to: { hits.hits.0._score: { value: 40.0, error: 0.001} } |
912 | 911 | - match: { hits.hits.1._id: "1" } |
913 | | - - match: { hits.hits.1._score: 5.0 } |
| 912 | + - close_to: { hits.hits.1._score: { value: 5.0, error: 0.001} } |
914 | 913 | - match: { hits.hits.2._id: "4" } |
915 | | - - match: { hits.hits.2._score: 2.0 } |
| 914 | + - close_to: { hits.hits.2._score: { value: 2.0, error: 0.001} } |
916 | 915 |
|
917 | 916 | --- |
918 | 917 | "linear retriever with filters": |
@@ -962,7 +961,7 @@ setup: |
962 | 961 | - match: { hits.total.value: 1 } |
963 | 962 | - length: {hits.hits: 1} |
964 | 963 | - match: { hits.hits.0._id: "4" } |
965 | | - - match: { hits.hits.0._score: 2.0 } |
| 964 | + - close_to: { hits.hits.0._score: { value: 2.0, error: 0.001} } |
966 | 965 |
|
967 | 966 | --- |
968 | 967 | "linear retriever with filters on nested retrievers": |
@@ -1013,7 +1012,7 @@ setup: |
1013 | 1012 | - match: { hits.total.value: 1 } |
1014 | 1013 | - length: {hits.hits: 1} |
1015 | 1014 | - match: { hits.hits.0._id: "4" } |
1016 | | - - match: { hits.hits.0._score: 2.0 } |
| 1015 | + - close_to: { hits.hits.0._score: { value: 2.0, error: 0.001} } |
1017 | 1016 |
|
1018 | 1017 |
|
1019 | 1018 | --- |
@@ -1150,7 +1149,7 @@ setup: |
1150 | 1149 | - match: { hits.hits.0._id: "2" } |
1151 | 1150 | - close_to: { hits.hits.0._score: { value: 1.5, error: 0.001 } } |
1152 | 1151 | - match: { hits.hits.1._id: "1" } |
1153 | | - - match: { hits.hits.1._score: 1 } |
| 1152 | + - close_to: { hits.hits.1._score: { value: 1, error: 0.001} } |
1154 | 1153 |
|
1155 | 1154 | --- |
1156 | 1155 | "should throw when rank_window_size is negative": |
@@ -1222,4 +1221,4 @@ setup: |
1222 | 1221 |
|
1223 | 1222 | - match: { hits.total.value: 1 } |
1224 | 1223 | - match: { hits.hits.0._id: "1" } |
1225 | | - - match: { hits.hits.0._score: 1.0 } |
| 1224 | + - close_to: { hits.hits.0._score: { value: 1.0, error: 0.001} } |
0 commit comments