接口定义
describeCollectionView() 用于查询指定 CollectionView 的信息。
public CollectionView describeCollectionView(String collectionView)
使用示例
// link databaseAIDatabase db = client.aiDatabase("db-test-ai");// describe collectionViewCollectionView descCollRes = db.describeCollectionView("coll-ai-files");System.out.println("\\tres: " + descCollRes.toString());
入参描述
参数名 | 是否必选 | 参数含义 | 配置方法 |
collectionViewName | 是 | 所需查询的 CollectionView 名称。 | CollectionView 命名要求如下: 只能使用英文字母,数字,下划线_、中划线-,并以英文字母开头。 长度要求:[1,128]。 |
出参描述
res: {"database": "db_test-ai","collectionView": "coll-ai-files","description": "test create ai collection","createTime": "2023-12-07 17:13:04","stats": {"indexedDocumentSets": 0,"totalDocumentSets": 0,"unIndexedDocumentSets": 0},"splitterPreprocess": {"appendTitleToChunk": false,"appendKeywordsToChunk": true},"embedding": {"language": "zh","enableWordsEmbedding": true},"alias": ["alias-coll-ai-files"],"indexes": [{"fieldName": "tags","fieldType": "array","indexType": "filter"},{"fieldName": "documentSetId","fieldType": "string","indexType": "primaryKey"},{"fieldName": "documentSetName","fieldType": "string","indexType": "filter"},{"fieldName": "author","fieldType": "string","indexType": "filter"}]}
返回参数
参数 | 子参数 | 子参数 | 参数含义 |
database | - | - | 显示 CollectionView 所在的 AI 类 Database 名称。 |
collectionView | - | - | 显示 CollectionView 的名称。 |
embedding | | language | 指定文件的语言类型,取值如下所示: zh:中文。 en:英文。 mutil:多语言。 |
| | enableWordsEmbedding | 配置在检索时,是否开启词(Words)向量精排,并进行词向量化。 true:开启。 false:不开启,默认为 false。 |
alias | - | - | |
createTime | - | - | 显示 CollectionView 的创建时间。 |
description | - | - | 显示 CollectionView 的描述信息。 |
stats
| 文件处理的状态 |
indexedDocumentSets
| 已处理完成的文件的数量。 |
| |
totalDocumentSets
| 所有的文件的数量。 |
| |
unIndexedDocumentSets
| 未处理的文件数量。 |
splitterPreprocess
| 文件预处理策略 |
appendTitleToChunk
| 在对文件拆分时,配置是否将 Title 追加到切分后的段落后面一并 Embedding。取值如下所示: True:将段落 Title 追加到切分后的段落。 False:不追加。 |
| |
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、tags。 |
| | filedType | 显示自定义字段的数据类型。 |
| | indexType |