You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: x-pack/plugin/rank-rrf/src/yamlRestTest/resources/rest-api-spec/test/linear/20_linear_retriever_simplified.yml
+37-8Lines changed: 37 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -56,13 +56,15 @@ setup:
56
56
type: text
57
57
timestamp:
58
58
type: date
59
-
vector:
59
+
dense_vector:
60
60
type: dense_vector
61
61
dims: 1
62
62
index: true
63
63
similarity: l2_norm
64
64
index_options:
65
65
type: flat
66
+
sparse_vector:
67
+
type: sparse_vector
66
68
67
69
- do:
68
70
bulk:
@@ -77,7 +79,10 @@ setup:
77
79
"text_1": "foo match 1",
78
80
"text_2": "x match 2",
79
81
"timestamp": "2000-03-30",
80
-
"vector": [1]
82
+
"dense_vector": [1],
83
+
"sparse_vector": {
84
+
"foo": 1.0
85
+
}
81
86
}
82
87
{"index": {"_id": "2"}}
83
88
{
@@ -87,7 +92,10 @@ setup:
87
92
"text_1": "bar match 3",
88
93
"text_2": "y match 4",
89
94
"timestamp": "2010-02-08",
90
-
"vector": [2]
95
+
"dense_vector": [2],
96
+
"sparse_vector": {
97
+
"bar": 1.0
98
+
}
91
99
}
92
100
{"index": {"_id": "3"}}
93
101
{
@@ -97,7 +105,10 @@ setup:
97
105
"text_1": "baz match 5",
98
106
"text_2": "z match 6",
99
107
"timestamp": "2024-08-08",
100
-
"vector": [3]
108
+
"dense_vector": [3],
109
+
"sparse_vector": {
110
+
"baz": 1.0
111
+
}
101
112
}
102
113
103
114
---
@@ -167,7 +178,7 @@ setup:
167
178
---
168
179
"Semantic match per-field boosting using the simplified format":
169
180
# The mock inference services generate synthetic vectors that don't accurately represent similarity to non-identical
170
-
# input, so it's hard to create a test produces intuitive results. Instead, we rely on the fact that the inference
181
+
# input, so it's hard to create a test that produces intuitive results. Instead, we rely on the fact that the inference
171
182
# services generate consistent vectors (i.e. same input -> same output) to demonstrate that per-field boosting on
172
183
# a semantic_text field can change the result order.
- contains: { error.root_cause.0.suppressed.0.failed_shards.0.reason.reason: "Field [vector] of type [dense_vector] does not support match queries" }
300
+
- contains: { error.root_cause.0.suppressed.0.failed_shards.0.reason.reason: "Field [dense_vector] of type [dense_vector] does not support match queries" }
0 commit comments