接口用于对指定索引详情的查看
V2接口 | V1接口 | |
|---|---|---|
参数命名风格 | 驼峰( | 下划线( |
说明
请求向量数据库 VikingDB 的 OpenAPI 接口时,可以使用 ak、sk 构造签名进行鉴权。请参见控制面API调用流程,复制调用示例并填入必要信息
请求参数Action取值:GetVikingdbIndex。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
ProjectName | String | 否 | 项目名称 |
CollectionName | String | 2选1 | 数据集名称 |
ResourceId | String | 数据集资源ID。请求必须指定ResourceId和CollectionName其中之一。 | |
IndexName | String | 是 | 索引名称 |
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 一级子参数 | 类型 | 描述 |
|---|---|---|---|
CollectionName | String | 数据集名称 | |
ProjectName | String | 项目名称 | |
ResourceId | String | 资源ID | |
IndexName | String | 索引名称 | |
CpuQuota | Integer | 索引检索消耗的 CPU 配额。 | |
ShardPolicy | String | 索引分片类型,auto为自动分片、custom为自定义分片。 | |
ShardCount | Integer | 索引分片数 | |
Description | String | 索引描述 | |
VectorIndex | Map | 向量索引配置 | |
IndexType | String | 索引类型 | |
Distance | String | 距离类型,衡量向量之间距离的算法。取值如下: | |
Quant | String | 量化方式。量化方式是索引中对向量的压缩方式,可以降低向量间相似性计算的复杂度。基于向量的高维度和大规模特点,采用向量量化可以有效减少向量的存储和计算成本。取值如下:
int8适用于hnsw、hnsw_hybrid、flat索引算法,距离方式为ip、consine。 float适用于hnsw、hnsw_hybrid、flat、diskann索引算法,距离方式为ip、l2、consine。 fix16适用于hnsw、hnsw_hybrid、flat索引算法,距离方式为ip、l2、consine。 pq适用于diskann、ivf索引算法,距离方式为ip、l2、consine。 | |
HnswM | Integer | hnsw 索引参数,表示邻居节点个数。
| |
HnswCef | Integer | hnsw 索引参数,表示构建图时搜索邻居节点的广度。
| |
HnswSef | Integer | hnsw 索引参数,表示线上检索的搜索广度。
| |
DiskannM | Integer | diskann参数,标识邻居节点个数。
| |
DiskannCef | Integer | diskann参数,表示构建图时搜索邻居节点的广度。
| |
PqCodeRatio | Float | diskann参数,向量维度编码的大小限制。值越大,召回率越高,但会增加内存使用量,范围 (0.0, 0.25]。
| |
CacheRatio | Float | diskann参数,缓存节点数与原始数据的比率,较大的值会提高索引性能并增加内存使用量。范围 [0.0,0.3)。
| |
ScalarIndex | Array of Map | 标量字段列表
| |
ActualCU | Integer | 实际CU用量 |
action = "GetVikingdbIndex", body = { "CollectionName": "coll_test1", "IndexName": "idx_test1" }
{ "ResponseMetadata": { "RequestId": "20250527175301151172242186A24F67", "Action": "GetVikingdbIndex", "Version": "2025-06-09", "Service": "vikingdb", "Region": "cn-beijing" }, "Result": { "CpuQuota": 1, "ShardPolicy": "auto", "ShardCount": 1, "Description": "", "ScalarIndex": [ { "FieldName": "f_int64_1", "FieldType": "int64", "DefaultValue": 0 }, { "FieldName": "f_string_1", "FieldType": "string", "DefaultValue": "default" } ], "VectorIndex": { "IndexType": "hnsw", "Distance": "ip", "Quant": "int8", "HnswM": 20, "HnswCef": 400, "HnswSef": 400, }, "IndexCost": { "CpuCore": 1, "MemGb": 2 }, "CollectionName": "coll_test1", "IndexName": "idx_test1", "ProjectName": "default", "ResourceId": "vdb-abcabcabc" } }
错误码请参见公共错误码文档。