release()
Near Deprecation此操作会将当前 Collection 的数据从内存中释放。
请求语法
python
release(
timeout=None,
)
参数:
-
timeout (float | None)
此操作的超时时长。将其设置为 None 表示当收到任何响应或发生任何错误时,此操作即超时。
示例
python
from pymilvus import Collection, CollectionSchema, FieldSchema, DataType
schema = CollectionSchema([
FieldSchema("id", DataType.INT64, is_primary=True),
FieldSchema("vector", DataType.FLOAT_VECTOR, dim=5)
])
# Create a collection
collection = Collection(
name="test_collection",
schema=schema
)
# Load the entire collection with one replica of the collection data
collection.load()
# Release the entire collection data
collection.release()
相关操作
以下操作与 release() 相关: