release()
This operation releases the data of the current partition from memory.
Request Syntax
release(
timeout: float | None
)
PARAMETERS:
-
timeout (float | None)
The timeout duration for this operation. Setting this to None indicates that this operation timeouts when any response arrives or any error occurs.
RETURN TYPE:
NoneType
RETURNS:
None
EXCEPTIONS:
-
MilvusException
This arises when any error occurs during this operation.
Examples
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
)
# Create a partition
partition = Partition(collection, name="comedy", description="comedy films")
# Load the partition data
partition.load()
# Release the partition data
partition.release()
Related operations
The following operations are related to release()
: