跳到主要内容

查看索引详情

This operation describes the current index.

POST
/v2/vectordb/indexes/describe
集群 Endpoint

该 API 的 Base URL 格式如下:

https://${CLUSTER_ENDPOINT}

📘说明
export CLUSTER_ENDPOINT=""
参数
Authorizationstringheaderrequired

认证令牌,应为具备适当权限的 API 密钥或用冒号分隔的用户名和密码,如 username:password

示例值:Bearer {{TOKEN}}
请求体application/json
collectionNamestring必填项

索引所属的 Collection 名称。

indexNamestring必填项

要描述的索引的名称。

export TOKEN="db_admin:xxxxxxxxxxxxx"

curl --request POST \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/indexes/describe" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"indexName": "vector",
"collectionName": "quick_setup"
}'
响应200 - application/json

A success response.

codeinteger

响应码。

示例值:0
dataobject

响应载荷,为索引详细信息。

fieldNamestring

目标字段的名称。

indexNamestring

索引的名称。

indexStatestring

索引当前状态。

indexTypestring

当前索引的类型。

indexedRowsinteger

已索引的 Entity 总数或行数。

metricTypestring

相似度类型。

pendingRowsinteger

等待被索引的 Entity 总数或行数。

totalRowsinteger

Entity 总数或行数。

failReasonstring

构建索引失败的原因。

A failure response.

codeinteger

响应码。

messagestring

错误描述。

{
"code": 0,
"data": [
{
"failReason": "",
"fieldName": "vector",
"indexName": "vector",
"indexState": "Finished",
"indexType": "",
"indexedRows": 0,
"metricType": "COSINE",
"pendingRows": 0,
"totalRows": 0
}
]
}