全部文档
当前文档

暂无内容

如果没有找到您期望的内容,请尝试其他搜索词

文档中心

put-vectors

最近更新时间:2026-11-11 10:30:20

put-vectors 命令用于写入向量数据。

命令格式

ks3util vectors-api put-vectors --vector-bucket-name value --index-name value --vectors value [options]

参数说明

参数

说明

--vector-bucket-name

向量桶名称。

--index-name

向量索引名称。

--index-krn

向量索引 KRN,与 --vector-bucket-name + --index-name 二选一。

--vectors

写入的向量数据,JSON 字符串或 file:// 指定文件,1-500 条。

使用示例

向索引写入两条向量。

ks3util vectors-api put-vectors --vector-bucket-name examplebucket --index-name index1 --vectors '[{"key":"k1","data":{"float32":[1,2,3,4]}},{"key":"k2","data":{"float32":[5,6,7,8]}}]'

从文件写入向量数据。

ks3util vectors-api put-vectors --vector-bucket-name examplebucket --index-name index1 --vectors file://vectors.json

写入带元数据的向量。

ks3util vectors-api put-vectors --vector-bucket-name examplebucket --index-name index1 --vectors '[{"key":"k1","data":{"float32":[1,2,3,4]},"metadata":{"color":"red"}}]'

按索引 KRN 写入向量数据。

ks3util vectors-api put-vectors --index-krn krn:ksc:ks3vectors:beijing:uid:bucket/examplebucket/index/index1 --vectors '[{"key":"k1","data":{"float32":[1,2,3,4]}}]'

文档导读
纯净模式常规模式

纯净模式

点击可全屏预览文档内容
文档反馈