|
@@ -81,9 +81,9 @@ setup:
|
|
|
|
|
|
- match: { hits.total.value: 2 }
|
|
|
- match: { hits.hits.0._id: "1" }
|
|
|
- - match: { hits.hits.0._score: 5.0 }
|
|
|
+ - close_to: { hits.hits.0._score: { value: 5.0, error: 0.001} }
|
|
|
- match: { hits.hits.1._id: "4" }
|
|
|
- - match: { hits.hits.1._score: 2.0 }
|
|
|
+ - close_to: { hits.hits.1._score: { value: 2.0, error: 0.001} }
|
|
|
|
|
|
---
|
|
|
"basic linear weighted combination - interleaved results":
|
|
@@ -174,13 +174,13 @@ setup:
|
|
|
|
|
|
- match: { hits.total.value: 4 }
|
|
|
- match: { hits.hits.0._id: "1" }
|
|
|
- - match: { hits.hits.0._score: 20.0 }
|
|
|
+ - close_to: { hits.hits.0._score: { value: 20.0, error: 0.001} }
|
|
|
- match: { hits.hits.1._id: "3" }
|
|
|
- - match: { hits.hits.1._score: 15.0 }
|
|
|
+ - close_to: { hits.hits.1._score: { value: 15.0, error: 0.001} }
|
|
|
- match: { hits.hits.2._id: "4" }
|
|
|
- - match: { hits.hits.2._score: 12.0 }
|
|
|
+ - close_to: { hits.hits.2._score: { value: 12.0, error: 0.001} }
|
|
|
- match: { hits.hits.3._id: "2" }
|
|
|
- - match: { hits.hits.3._score: 10.0 }
|
|
|
+ - close_to: { hits.hits.3._score: { value: 10.0, error: 0.001} }
|
|
|
|
|
|
---
|
|
|
"should normalize initial scores":
|
|
@@ -256,12 +256,11 @@ setup:
|
|
|
|
|
|
- match: { hits.total.value: 4 }
|
|
|
- match: { hits.hits.0._id: "1" }
|
|
|
- - match: {hits.hits.0._score: 10.0}
|
|
|
+ - close_to: { hits.hits.0._score: { value: 10.0, error: 0.001} }
|
|
|
- match: { hits.hits.1._id: "2" }
|
|
|
- - match: {hits.hits.1._score: 8.0}
|
|
|
+ - close_to: { hits.hits.1._score: { value: 8.0, error: 0.001} }
|
|
|
- match: { hits.hits.2._id: "4" }
|
|
|
- - match: {hits.hits.2._score: 2.0}
|
|
|
- - match: { hits.hits.2._score: 2.0 }
|
|
|
+ - close_to: { hits.hits.2._score: { value: 2.0, error: 0.001} }
|
|
|
- match: { hits.hits.3._id: "3" }
|
|
|
- close_to: { hits.hits.3._score: { value: 0.0, error: 0.001 } }
|
|
|
|
|
@@ -310,13 +309,13 @@ setup:
|
|
|
|
|
|
- match: { hits.total.value: 4 }
|
|
|
- match: { hits.hits.0._id: "2" }
|
|
|
- - match: { hits.hits.0._score: 8.0 }
|
|
|
+ - close_to: { hits.hits.0._score: { value: 8.0, error: 0.001} }
|
|
|
- match: { hits.hits.1._id: "1" }
|
|
|
- - match: { hits.hits.1._score: 6.0 }
|
|
|
+ - close_to: { hits.hits.1._score: { value: 6.0, error: 0.001} }
|
|
|
- match: { hits.hits.2._id: "4" }
|
|
|
- close_to: { hits.hits.2._score: { value: 1.6, error: 0.001 } }
|
|
|
- match: { hits.hits.3._id: "3" }
|
|
|
- - match: { hits.hits.3._score: 1.2 }
|
|
|
+ - close_to: { hits.hits.3._score: { value: 1.2, error: 0.001} }
|
|
|
|
|
|
---
|
|
|
"should handle all zero scores in normalization":
|
|
@@ -514,7 +513,7 @@ setup:
|
|
|
- match: { hits.total.value: 4 }
|
|
|
- length: { hits.hits: 1 }
|
|
|
- match: { hits.hits.0._id: "4" }
|
|
|
- - match: { hits.hits.0._score: 2.0 }
|
|
|
+ - close_to: { hits.hits.0._score: { value: 2.0, error: 0.001} }
|
|
|
|
|
|
- do:
|
|
|
search:
|
|
@@ -703,9 +702,9 @@ setup:
|
|
|
|
|
|
- match: { hits.total.value: 4 }
|
|
|
- match: { hits.hits.0._id: "4" }
|
|
|
- - match: { hits.hits.0._score: 2.0 }
|
|
|
+ - close_to: { hits.hits.0._score: { value: 2.0, error: 0.001} }
|
|
|
- match: { hits.hits.1._id: "1" }
|
|
|
- - match: { hits.hits.1._score: 1.0 }
|
|
|
+ - close_to: { hits.hits.1._score: { value: 1.0, error: 0.001} }
|
|
|
|
|
|
---
|
|
|
"explain should provide info on weights and inner retrievers":
|
|
@@ -908,11 +907,11 @@ setup:
|
|
|
|
|
|
- match: { hits.total.value: 3 }
|
|
|
- match: { hits.hits.0._id: "2" }
|
|
|
- - match: { hits.hits.0._score: 40.0 }
|
|
|
+ - close_to: { hits.hits.0._score: { value: 40.0, error: 0.001} }
|
|
|
- match: { hits.hits.1._id: "1" }
|
|
|
- - match: { hits.hits.1._score: 5.0 }
|
|
|
+ - close_to: { hits.hits.1._score: { value: 5.0, error: 0.001} }
|
|
|
- match: { hits.hits.2._id: "4" }
|
|
|
- - match: { hits.hits.2._score: 2.0 }
|
|
|
+ - close_to: { hits.hits.2._score: { value: 2.0, error: 0.001} }
|
|
|
|
|
|
---
|
|
|
"linear retriever with filters":
|
|
@@ -962,7 +961,7 @@ setup:
|
|
|
- match: { hits.total.value: 1 }
|
|
|
- length: {hits.hits: 1}
|
|
|
- match: { hits.hits.0._id: "4" }
|
|
|
- - match: { hits.hits.0._score: 2.0 }
|
|
|
+ - close_to: { hits.hits.0._score: { value: 2.0, error: 0.001} }
|
|
|
|
|
|
---
|
|
|
"linear retriever with filters on nested retrievers":
|
|
@@ -1013,7 +1012,7 @@ setup:
|
|
|
- match: { hits.total.value: 1 }
|
|
|
- length: {hits.hits: 1}
|
|
|
- match: { hits.hits.0._id: "4" }
|
|
|
- - match: { hits.hits.0._score: 2.0 }
|
|
|
+ - close_to: { hits.hits.0._score: { value: 2.0, error: 0.001} }
|
|
|
|
|
|
|
|
|
---
|
|
@@ -1150,7 +1149,7 @@ setup:
|
|
|
- match: { hits.hits.0._id: "2" }
|
|
|
- close_to: { hits.hits.0._score: { value: 1.5, error: 0.001 } }
|
|
|
- match: { hits.hits.1._id: "1" }
|
|
|
- - match: { hits.hits.1._score: 1 }
|
|
|
+ - close_to: { hits.hits.1._score: { value: 1, error: 0.001} }
|
|
|
|
|
|
---
|
|
|
"should throw when rank_window_size is negative":
|
|
@@ -1222,4 +1221,4 @@ setup:
|
|
|
|
|
|
- match: { hits.total.value: 1 }
|
|
|
- match: { hits.hits.0._id: "1" }
|
|
|
- - match: { hits.hits.0._score: 1.0 }
|
|
|
+ - close_to: { hits.hits.0._score: { value: 1.0, error: 0.001} }
|