drop_collection()
Near Deprecation此操作会删除指定的 Collection。
请求语法
python
drop_collection(
collection_name: str,
timeout: float | None,
using: str = "default",
)
参数:
-
collection_name (str) -
[必需]
要删除的 Collection 名称。
-
timeout (float)
此操作的超时时长。将其设置为 None 表示,当收到任何响应或发生任何错误时,此操作即超时。
-
using (str) -
所使用连接的别名。
默认值为 default,表示此操作使用默认连接。
返回类型:
NoneType
返回:
None
异常:
N/A
示例
python
from pymilvus import connections, utility
# Connect to YOUR_CLUSTER_ENDPOINT
connections.connect()
# Drop a specific collection
utility.drop_collection(
collection_name="test_collection",
)
相关操作
以下操作与 drop_collection() 方法相关: