按特定条件批量更新数据,不支持vector、sparse_vector、text 类型字段的更新
参数名 | 类型 | 必须 | 说明 | 子字段 | 类型 | 必选 | 说明 |
---|---|---|---|---|---|---|---|
task_type | string | 是 | 任务类型,填入 filter_update | ||||
task_params | map | 是 | 任务参数 | collection_name | string | 是 | Collection 名称,必填 |
filter_conds | map | 是 | 过滤条件,支持 must 、must_nor、range、range_out 算子,使用参考标量过滤
| ||||
update_fileds | map | 是 | 需要更新的字段值,必须是标量字段,不支持vector、sparse_vector、text 类型字段的更新
|
curl -i -X POST \ -H 'Content-Type: application/json' \ -H 'Authorization: HMAC-SHA256 ***' \ https://api-vikingdb.volces.com/api/task/create \ -d '{ "task_type": "filter_update", "task_params": { "collection_name": "example", #collection 名称 "filter_conds": [ { "op": "must", "field": "city", "conds": ["beijing"] }, { "op": "range", "field": "user_id", "gt": 0, "lt": 4 }, ], "update_fields": { "city": "shanghai" } } }'
属性 | 说明 |
---|---|
task_id | uuid |