get_compaction_plans()
This operation returns the compaction plans for a specific compaction job, including the merge plans showing which segments will be combined.
Request syntax
client.get_compaction_plans(
job_id: int,
timeout: float = None
) -> CompactionPlans
PARAMETERS:
job_id (int) -
[REQUIRED]
The ID of the compaction job returned by
compact().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:
CompactionPlans
EXCEPTIONS:
MilvusException
This exception will be raised when any error occurs during this operation.
Example
from pymilvus import MilvusClient
client = MilvusClient(
uri="http://localhost:19530",
token="root:Milvus"
)
job_id = client.compact(collection_name="my_collection")
plans = client.get_compaction_plans(job_id=job_id)
print(plans)