最近更新时间: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]}}]'
纯净模式
