Skip to content

Commit e5f8079

Browse files
committed
Added additional test
1 parent c43a075 commit e5f8079

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

x-pack/plugin/rank-rrf/src/yamlRestTest/resources/rest-api-spec/test/rrf/320_rrf_weighted_retriever.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ setup:
5858
- match: { hits.hits.0._id: "1" }
5959

6060
---
61-
"Weighted RRF retriever defaults to weight 1":
61+
"Weighted RRF retriever allows optional weight field":
6262
- do:
6363
search:
6464
index: restaurants
@@ -80,6 +80,31 @@ setup:
8080
- match: { hits.total.value: 3 }
8181
- match: { hits.hits.0._id: "1" }
8282

83+
---
84+
"Weighted RRF retriever changes result order":
85+
- do:
86+
search:
87+
index: restaurants
88+
body:
89+
retriever:
90+
rrf:
91+
retrievers:
92+
- retriever:
93+
standard:
94+
query:
95+
match:
96+
description: "pizza"
97+
weight: 0.1
98+
- retriever:
99+
standard:
100+
query:
101+
match:
102+
description: "burgers"
103+
weight: 0.9
104+
- match: { hits.total.value: 2 }
105+
- match: { hits.hits.0._id: "2" }
106+
- match: { hits.hits.1._id: "1" }
107+
83108
---
84109
"Weighted RRF retriever errors on negative weight":
85110
- do:

0 commit comments

Comments
 (0)