| name | collection |
| description | Use when the user wants to create, list, describe, drop, rename, load, release, or manage collections and collection aliases in Milvus. |
Prerequisites
- CLI installed, logged in, and cluster context set (see setup skill).
Commands Reference
All collection commands accept an optional --database <db-name> flag to target a non-default database. If omitted, the database from the current context is used.
Collection metrics
Query per-collection metrics against POST /v2/clusters/{clusterId}/metrics/query with collectionName set in the request body. Mirrors the web console's Collection Detail > Metrics page.
zilliz collection metrics --collection-name <collection-name> --metric <metric-name>
The default output is an inline text chart: one block per metric with a summary line (min / max / avg / last) and a Braille-rendered line chart. Pass an explicit -o table (or --output table) to render the pivot-table layout — useful for terminals without good Braille font support. -o json, -o yaml, -o csv, and --query always bypass both renderers and return the raw response.
Examples:
zilliz collection metrics -c my_coll -m SEARCH_QPS --period 1h
zilliz collection metrics -c my_coll -m ENTITIES_LOADED \
--start 2026-04-13T00:00:00Z --end 2026-04-14T00:00:00Z -g 1h
zilliz collection metrics -c my_coll -m SEARCH_QPS -m SEARCH_LATENCY_P99 --period 6h
Metric scope
Each metric is tagged with a scope. zilliz collection metrics only accepts metrics whose scope is Collection or Both. Using a Cluster-only metric emits:
Metric '<NAME>' is cluster-scope only and cannot be used with --collection-name.
| Scope | Metrics |
|---|
| Cluster only (rejected here) | CU_COMPUTATION, CU_CAPACITY, CU_SIZE, REPLICA_COUNT, STORAGE, COLLECTIONS, SLOW_QUERIES, READ_VCU, WRITE_VCU |
| Collection / Both (allowed) | SEARCH_QPS, QUERY_QPS, INSERT_QPS, UPSERT_QPS, DELETE_QPS, BULK_INSERT_QPS, SEARCH_LATENCY_AVG/P99, QUERY_LATENCY_AVG/P99, INSERT_LATENCY_AVG/P99, UPSERT_LATENCY_AVG/P99, DELETE_LATENCY_AVG/P99, VPS counters, failure-rate counters, ENTITIES, ENTITIES_LOADED, ENTITIES_INDEXED, plus the hybrid-search aliases below |
Hybrid-search aliases
| CLI name | Backend name |
|---|
HYBRID_SEARCH_QPS | REQ_HYBRID_SEARCH_COUNT |
HYBRID_SEARCH_LATENCY_AVG | REQ_HYBRID_SEARCH_LATENCY_AVG |
HYBRID_SEARCH_LATENCY_P99 | REQ_HYBRID_SEARCH_LATENCY_P99 |
HYBRID_SEARCH_FAIL_RATE | REQ_FAIL_RATE_HYBRID_SEARCH |
For cluster-wide metrics (CU sizing, storage, serverless VCU, slow queries) use zilliz cluster metrics instead -- see the monitoring skill.
Create a Collection
zilliz collection create --name <collection-name> --dimension <vector-dimension>
List Collections
zilliz collection list
Describe a Collection
zilliz collection describe --name <collection-name>
Drop a Collection
zilliz collection drop --name <collection-name-to-drop>
Rename a Collection
zilliz collection rename --name <current-collection-name> --new-name <new-collection-name>
Load a Collection
zilliz collection load --name <collection-name>
Release a Collection
zilliz collection release --name <collection-name>
Get Load State
zilliz collection get-load-state --name <collection-name>
Get Statistics
zilliz collection get-stats --name <collection-name>
Check if a Collection Exists
zilliz collection has --name <collection-name>
Flush a Collection
zilliz collection flush --name <collection-name>
Compact a Collection
zilliz collection compact --name <collection-name>
Collection Aliases
Create an Alias
zilliz alias create --collection <target-collection-name> --alias <alias-name>
List Aliases
zilliz alias list --database <database-name>
Describe an Alias
zilliz alias describe --alias <alias-name>
Alter an Alias
zilliz alias alter --collection <new-target-collection> --alias <alias-name-to-reassign>
Drop an Alias
zilliz alias drop --alias <alias-name-to-drop>
Guidance
- When the user wants to create a collection, ask about their use case to recommend appropriate dimension, metric type, and schema.
- Before dropping a collection, always confirm with the user -- this deletes all data.
- A collection must be loaded before it can be searched or queried.
- After creating a collection, suggest loading it if the user plans to query immediately.
- Use
describe to inspect schema before performing vector operations.