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
Here is an example using the `query_vector_builder`:
238
+
239
+
```json
240
+
{
241
+
"query": {
242
+
"knn": {
243
+
"field": "inference_field",
244
+
"k": 10,
245
+
"num_candidates": 100,
246
+
"query_vector_builder": {
247
+
"text_embedding": {
248
+
"model_text": "test"
249
+
}
250
+
}
251
+
}
252
+
},
253
+
"_source": {
254
+
"exclude": "inference_field.inference.chunks"
255
+
}
256
+
}
257
+
```
258
+
259
+
Note that for `semantic_text` fields, the `model_id` does not have to be
260
+
provided as it can be inferred from the `semantic_text` field mapping.
261
+
262
+
Knn search using query vectors over `semantic_text` fields is also supported,
263
+
with no change to the API.
264
+
232
265
## Knn query with aggregations [knn-query-aggregations]
233
266
234
267
`knn` query calculates aggregations on top `k` documents from each shard. Thus, the final results from aggregations contain `k * number_of_shards` documents. This is different from the [top level knn section](docs-content://solutions/search/vector/knn.md) where aggregations are calculated on the global top `k` nearest documents.
Copy file name to clipboardExpand all lines: modules/data-streams/src/main/java/org/elasticsearch/datastreams/action/TransportUpdateDataStreamSettingsAction.java
0 commit comments