删除 CollectionView

最近更新时间:2024-09-27 18:00:11

我的收藏

接口定义

drop_collection_view() 用于删除已创建的 CollectionView。
def drop_collection_view( collection_view_name: str, timeout: float | None = None ) -> Dict[str, Any]

使用实例

警告:
执行 drop 操作将会永久删除指定 CollectionView 下的所有 DocumentSet。在操作之前,务必谨慎考虑。
# 指定 AI 类数据库
db = client.database('db-test-ai')
# 删除 AI 类数据库下的指定集合视图
db.drop_collection_view(collection_view_name ='coll-ai-files')

入参描述

参数名
是否必选
参数含义
配置方法
collection_view_name
所需删除的 CollectionView 名称。
请使用 list_collection_view() 查找需删除的集合视图。
timeout
请求超时时间。
单位:秒。
默认值:VectorDBClient() 接口配置的 timeout 时长。
取值范围:大于等于0。

出参描述

{
'code': 0,
'msg': 'Operation success, requestId: 88eeb1748ebc9b1715bbef**********',
'affectedCount': 1
}
参数名
参数含义
affectedCount
影响行数,即为删除的集合视图数量。