Skip to content

Commit f10de9d

Browse files
committed
iter
1 parent 0d02f0f commit f10de9d

File tree

1 file changed

+48
-5
lines changed

1 file changed

+48
-5
lines changed

x-pack/plugin/inference/src/yamlRestTest/resources/rest-api-spec/test/inference/70_text_similarity_rank_retriever.yml

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,30 @@ setup:
7676
retriever:
7777
standard:
7878
query:
79-
term:
80-
topic: "science"
79+
bool: {
80+
should: [
81+
{
82+
constant_score: {
83+
filter: {
84+
term: {
85+
subtopic: "technology"
86+
}
87+
},
88+
boost: 10
89+
}
90+
},
91+
{
92+
constant_score: {
93+
filter: {
94+
term: {
95+
subtopic: "astronomy"
96+
}
97+
},
98+
boost: 1
99+
}
100+
}
101+
]
102+
}
81103
rank_window_size: 10
82104
inference_id: my-rerank-model
83105
inference_text: "How often does the moon hide the sun?"
@@ -187,8 +209,29 @@ setup:
187209
{
188210
standard: {
189211
query: {
190-
term: {
191-
topic: "science"
212+
bool: {
213+
should: [
214+
{
215+
constant_score: {
216+
filter: {
217+
term: {
218+
subtopic: "technology"
219+
}
220+
},
221+
boost: 10
222+
}
223+
},
224+
{
225+
constant_score: {
226+
filter: {
227+
term: {
228+
subtopic: "astronomy"
229+
}
230+
},
231+
boost: 1
232+
}
233+
}
234+
]
192235
}
193236
}
194237
}
@@ -206,7 +249,7 @@ setup:
206249
- match: { hits.hits.1._id: "doc_1" }
207250

208251
- match: {hits.hits.0._explanation.description: "/text_similarity_reranker.match.using.inference.endpoint:.\\[my-rerank-model\\].on.document.field:.\\[text\\].*/" }
209-
- match: {hits.hits.0._explanation.details.0.description: "/weight.*science.*/" }
252+
- match: {hits.hits.0._explanation.details.0.details.0.description: "/subtopic.*astronomy.*/" }
210253

211254
---
212255
"text similarity reranker properly handles aliases":

0 commit comments

Comments
 (0)