用途:在 Milvus 集合上执行索引的创建、查看、描述与删除操作,属于 Zilliz 插件中的 index 技能。
前置条件:已安装并登录 CLI、已设置集群上下文(见 setup 技能);目标集合需已存在(见 collection 技能)。
主要能力与用法:所有命令支持可选的 --database <db-name> 参数,省略时使用当前上下文中的数据库。 创建索引:zilliz index create --collection <collection-name>,也可用原始 JSON,如 --body '{"indexParams": [{"fieldName": "vector", "indexType": "AUTOINDEX", "metricType": "COSINE"}]}'。 列出索引:zilliz index list --collection <collection-name>。 描述索引:zilliz index describe --collection <collection-name> --index-name <index-name>。 删除索引:zilliz index drop --collection <collection-name> --index-name <index-name-to-drop>。
索引与度量类型:常见索引类型包括 AUTOINDEX(推荐,自动选择最佳索引)、IVF_FLAT、IVF_SQ8、HNSW(供高级用户手动选择)。常见度量类型包括 COSINE(默认,余弦相似度)、L2(欧氏距离)、IP(内积)。
指导与限制:在 Zilliz Cloud 上,多数场景推荐 AUTOINDEX。加载集合以进行搜索前必须先建立索引;创建索引前应检查集合 schema 以确认向量字段;创建索引后需提醒用户加载集合。其余收费、平台或价格信息暂未提供。