# index

Creates, lists, describes, and drops indexes on Milvus collections from the CLI.

Skill by Zilliz (Milvus). Category: Data and backend.

## Install

Project (for this project only):

```sh
npx skills add zilliztech/zilliz-plugin --skill index
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

Global (for every project on this machine):

```sh
npx skills add zilliztech/zilliz-plugin --skill index -g
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

## Tags

- Runs on your computer: It runs as a program on your machine, with your access.

## Security audits

- Gen Agent Trust Hub: Pass
- Socket: Pass
- Snyk: Pass

Installs: 2. Installs counted by skills.sh. [Open on skills.sh](https://www.skills.sh/zilliztech/zilliz-plugin/index)

## Source

[Open the source](https://github.com/zilliztech/zilliz-plugin/tree/HEAD/plugins/zilliz/skills/index). Checked 2026-10-10. This summary may contain AI-generated text, so it can be wrong. Check the source before you rely on it.

## SKILL.md

````markdown
---
name: index
description: Use when the user wants to create, list, describe, or drop indexes on Milvus collections.
---

## Prerequisites

1. CLI installed, logged in, and cluster context set (see setup skill).
2. Target collection must exist (see collection skill).

## Commands Reference

All index commands accept an optional `--database <db-name>` flag. If omitted, the database from the current context is used.

### Create an Index

```bash
zilliz index create --collection <collection-name>
# Optional: --database <database-name>
# Or use raw JSON: --body '{"indexParams": [{"fieldName": "vector", "indexType": "AUTOINDEX", "metricType": "COSINE"}]}'
```

### List Indexes

```bash
zilliz index list --collection <collection-name>
# Optional: --database <database-name>
```

### Describe an Index

```bash
zilliz index describe --collection <collection-name> --index-name <index-name>
# Optional: --database <database-name>
```

### Drop an Index

```bash
zilliz index drop --collection <collection-name> --index-name <index-name-to-drop>
# Optional: --database <database-name>
```

## Index Types

Common index types:
- `AUTOINDEX` -- recommended, automatically selects the best index
- `IVF_FLAT`, `IVF_SQ8`, `HNSW` -- manual selection for advanced users

Common metric types:
- `COSINE` -- cosine similarity (default)
- `L2` -- Euclidean distance
- `IP` -- inner product

## Guidance

- On Zilliz Cloud, `AUTOINDEX` is recommended for most use cases.
- An index is required before loading a collection for search.
- Before creating an index, check the collection schema to identify vector fields.
- After creating an index, remind the user to load the collection.
````

- Previous: [import](https://syn4pse.dev/terminal/zilliz-import.md)
- Next: [job](https://syn4pse.dev/terminal/zilliz-job.md)
- [Terminal](https://syn4pse.dev/terminal.md)
- [Suggest a change](mailto:terminal@syn4pse.dev?subject=Terminal%20suggestion)
