用户之声——提建议·赢好礼> HOT

功能介绍

/ai/collectionView/list 接口用于查询指定 AI 类 Database 中所有的 CollectionView。

请求示例

注意:
如下示例可直接复制,在 CVM 运行之前,您需在文本编辑器将 api_key=A5VOgsMpGWJhUI0WmUbY******************** 与 10.0.X.X 依据实际情况进行替换。
curl -i -X POST \\
-H 'Content-Type: application/json' \\
-H 'Authorization: Bearer account=root&api_key=A5VOgsMpGWJhUI0WmUbY********************' \\
http://10.0.X.X:80/ai/collectionView/list \\
-d '{
"database": "db-test-ai"
}'

请求参数

参数
是否必选
参数含义
配置方法
database
设置 CollectionView 所属的 Database 库名。
使用 /database/list 获取集群中的数据库列表,复制需删除集合所属的数据库名。

响应信息

状态码

状态码
含义
响应消息
200
执行成功
返回消息体中,以数组的形式列出了数据库中所有的 CollectionView 信息。具体参数含义,请参见 返回消息参数
400
执行失败
{
"code": 1,
"msg": "operation failed, reason...."
}

返回参数

{
"code": 0,
"msg": "Operation success, requestId: 73c1bbef76709b17c6b9ef**********",
"collectionViews": [
{
"database": "db-test-ai",
"collectionView": "coll-ai-files",
"description": "this is a collection description",
"embedding": {
"language": "zh",
"enableWordsEmbedding": false
},
"splitterPreprocess": {
"appendTitleToChunk": true,
"appendKeywordsToChunk": true
},
"indexes": [
{
"fieldName": "tags",
"fieldType": "array",
"indexType": "filter"
},
{
"fieldName": "documentSetName",
"fieldType": "string",
"indexType": "filter"
},
{
"fieldName": "documentSetId",
"fieldType": "string",
"indexType": "primaryKey"
},
{
"fieldName": "author",
"fieldType": "string",
"indexType": "filter"
}
],
"createTime": "2023-11-27 17:16:54",
"alias": [
"alias-coll-ai-files"
],
"stats": {
"indexedDocumentSets": 0,
"totalDocumentSets": 0,
"unIndexedDocumentSets": 0
}
}
]
}

参数
子参数
子参数
参数含义
database
-
-
显示 CollectionView 所在的 AI 类 Database 名称。
collectionView
-
-
显示 CollectionView 的名称。
embedding

language
指定文件的语言类型,取值如下所示:
zh:中文。
en:英文。
mutil:多语言。
enableWordsEmbedding
配置在检索时,是否开启词(Words)向量精排,并进行词向量化。
true:开启。
false:不开启,默认为 false
alias
-
-
CollectionView 的所有别名。创建别名,请参见 /ai/alias/set
createTime
-
-
显示 CollectionView 的创建时间。
description
-
-
显示 CollectionView 的描述信息。
stats
文件处理的状态
indexedDocumentSets
已处理完成的文件的数量。
totalDocumentSets
所有的文件的数量。
unIndexedDocumentSets
未处理的文件数量。
splitterPreprocess
文件预处理策略
appendTitleToChunk
在对文件拆分时,配置是否将 Title 追加到切分后的段落后面一并 Embedding。取值如下所示:
false:不追加。
true:将段落 Title 追加到切分后的段落。
appendKeywordsToChunk
在对文件拆分时,配置是否将关键字 keywords 追加到切分后的段落一并 Embedding。取值如下所示:
false:不追加。
true:将全文的 keywords 追加到切分后的段落。
Indexes
默认以 documentSetId 文件ID 创建主键索引
fieldName
标识索引对象为 documentSetId
filedType
显示该索引对象的数据类型,固定为 string
indexType
该参数固定显示为 primaryKey
默认以 documentSetName 文件名创建 Filter 索引
fieldName
标识索引对象为文件名,固定为 documentSetName
filedType
显示索引对象为文件名的数据类型,固定为 string
indexType
显示索引对象为文件名的索引类型,固定为 filter。在后续检索数据时,才能对该字段设置 Filter 条件表达式进行检索。
其他自定义需建立 Filter 索引的字段
fieldName
自定义扩展字段,例如:author、tag。
filedType
显示自定义字段的数据类型,支持:uinit、string、array。
indexType
显示自定义字段索引类别为filter。在后续检索数据时,才能对该字段设置 Filter 条件表达式进行 混合检索