{"id":19428,"plugin_id":"plugins_6a992fa57b6481918dffd35d23f03408","kind":"skill","collection_source":null,"comparison_source":null,"observed_at":"2026-09-30T23:15:34.388Z","digest":"874f7a44c0f5e4e3f05b946f5db4fcd8e652baffe60349551d302f63b5648ab6","against":null,"payload":{"description":"Use when the user wants to create, list, describe, drop, rename, load, release, or manage collections and collection aliases in Milvus.","included_files":[],"name":"collection","skill_md_contents":"---\nname: collection\ndescription: Use when the user wants to create, list, describe, drop, rename, load, release, or manage collections and collection aliases in Milvus.\n---\n\n## Prerequisites\n\n1. CLI installed, a usable data-plane credential configured, and cluster context set (see setup skill).\n\n## Commands Reference\n\nAll 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.\n\n## Collection metrics\n\nQuery 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.\n\n```bash\nzilliz collection metrics --collection-name <collection-name> --metric <metric-name>\n# Optional:\n#   --cluster-id <cluster-id>         Override cluster context\n#   --period <duration>               e.g. 1h, 24h, 7d (mutually exclusive with --start/--end)\n#   --start <iso-8601> --end <iso-8601>\n#   --granularity <duration> / -g     e.g. 30s, 5m, 1h (auto-selected if omitted)\n#   -o table                          Render pivot table instead of the default inline chart\n```\n\nThe 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.\n\nExamples:\n\n```bash\n# Period shorthand: last hour of SEARCH_QPS for a collection\nzilliz collection metrics -c my_coll -m SEARCH_QPS --period 1h\n\n# Explicit range with 1h granularity\nzilliz collection metrics -c my_coll -m ENTITIES_LOADED \\\n  --start 2026-04-13T00:00:00Z --end 2026-04-14T00:00:00Z -g 1h\n\n# Multiple metrics in a single call\nzilliz collection metrics -c my_coll -m SEARCH_QPS -m SEARCH_LATENCY_P99 --period 6h\n```\n\n### Metric scope\n\nEach metric is tagged with a scope. `zilliz collection metrics` only accepts metrics whose scope is `Collection` or `Both`. Using a Cluster-only metric emits:\n\n```\nMetric '<NAME>' is cluster-scope only and cannot be used with --collection-name.\n```\n\n| Scope | Metrics |\n|-------|---------|\n| Cluster only (rejected here) | `CU_COMPUTATION`, `CU_CAPACITY`, `CU_SIZE`, `REPLICA_COUNT`, `STORAGE`, `COLLECTIONS`, `SLOW_QUERIES`, `READ_VCU`, `WRITE_VCU` |\n| 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 |\n\n### Hybrid-search aliases\n\n| CLI name | Backend name |\n|----------|--------------|\n| `HYBRID_SEARCH_QPS` | `REQ_HYBRID_SEARCH_COUNT` |\n| `HYBRID_SEARCH_LATENCY_AVG` | `REQ_HYBRID_SEARCH_LATENCY_AVG` |\n| `HYBRID_SEARCH_LATENCY_P99` | `REQ_HYBRID_SEARCH_LATENCY_P99` |\n| `HYBRID_SEARCH_FAIL_RATE` | `REQ_FAIL_RATE_HYBRID_SEARCH` |\n\nFor cluster-wide metrics (CU sizing, storage, serverless VCU, slow queries) use `zilliz cluster metrics` instead -- see the monitoring skill.\n\n### Create a Collection\n\n```bash\nzilliz collection create --name <collection-name> --dimension <vector-dimension>\n# Optional:\n#   --metric-type <COSINE|L2|IP>\n#   --id-type <Int64|VarChar>\n#   --auto-id <true|false>\n#   --primary-field <primary-key-field-name>\n#   --vector-field <vector-field-name>\n#   --database <database-name>\n# Or use raw JSON: --body '{\"schema\": {\"fields\": [{\"fieldName\": \"id\", \"dataType\": \"Int64\", \"isPrimary\": true}, {\"fieldName\": \"vector\", \"dataType\": \"FloatVector\", \"elementTypeParams\": {\"dim\": \"768\"}}]}}'\n```\n\n### List Collections\n\n```bash\nzilliz collection list\n# Optional: --database <database-name>\n```\n\n### Describe a Collection\n\n```bash\nzilliz collection describe --name <collection-name>\n# Optional: --database <database-name>\n```\n\n### Drop a Collection\n\n```bash\nzilliz collection drop --name <collection-name-to-drop>\n# Optional: --database <database-name>\n```\n\n### Rename a Collection\n\n```bash\nzilliz collection rename --name <current-collection-name> --new-name <new-collection-name>\n# Optional: --database <current-database-name>, --new-database <target-database-name>\n```\n\n### Load a Collection\n\n```bash\nzilliz collection load --name <collection-name>\n# Optional: --database <database-name>\n```\n\n### Release a Collection\n\n```bash\nzilliz collection release --name <collection-name>\n# Optional: --database <database-name>\n```\n\n### Get Load State\n\n```bash\nzilliz collection get-load-state --name <collection-name>\n# Optional: --database <database-name>\n```\n\n### Get Statistics\n\n```bash\nzilliz collection get-stats --name <collection-name>\n# Optional: --database <database-name>\n```\n\n### Check if a Collection Exists\n\n```bash\nzilliz collection has --name <collection-name>\n# Optional: --database <database-name>\n```\n\n### Flush a Collection\n\n```bash\nzilliz collection flush --name <collection-name>\n# Optional: --database <database-name>\n```\n\n### Compact a Collection\n\n```bash\nzilliz collection compact --name <collection-name>\n# Optional: --database <database-name>\n```\n\n### Collection Aliases\n\n#### Create an Alias\n\n```bash\nzilliz alias create --collection <target-collection-name> --alias <alias-name>\n# Optional: --database <database-name>\n```\n\n#### List Aliases\n\n```bash\nzilliz alias list --database <database-name>\n# Optional: --collection <filter-by-collection-name>\n```\n\n#### Describe an Alias\n\n```bash\nzilliz alias describe --alias <alias-name>\n# Optional: --database <database-name>\n```\n\n#### Alter an Alias\n\n```bash\nzilliz alias alter --collection <new-target-collection> --alias <alias-name-to-reassign>\n# Optional: --database <database-name>\n```\n\n#### Drop an Alias\n\n```bash\nzilliz alias drop --alias <alias-name-to-drop>\n# Optional: --database <database-name>\n```\n\n## Guidance\n\n- When the user wants to create a collection, ask about their use case to recommend appropriate dimension, metric type, and schema.\n- Before dropping a collection, always confirm with the user -- this deletes all data.\n- A collection must be loaded before it can be searched or queried.\n- After creating a collection, suggest loading it if the user plans to query immediately.\n- Use `describe` to inspect schema before performing vector operations.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}