create_collection
Create vector collections in Milvus or Zilliz Cloud by specifying cluster details, dimensions, and metric types to organize data for similarity searches.
Instructions
Create a collection in a specified cluster using Quick Setup.
Args:
cluster_id: ID of the cluster
region_id: ID of the cloud region hosting the cluster
endpoint: The cluster endpoint URL. Can be obtained by calling describe_cluster and using the connect_address field
collection_name: The name of the collection to create
dimension: The number of dimensions a vector value should have
db_name: The name of the database. Pass explicit dbName or leave empty when cluster is free or serverless
metric_type: The metric type (default: "COSINE", options: "L2", "IP", "COSINE") Ask the user to select the metric type, if user does not select, use default value "COSINE"
id_type: The data type of the primary field (default: "Int64", options: "Int64", "VarChar")
auto_id: Whether the primary field automatically increments (default: True)
primary_field_name: The name of the primary field (default: "id")
vector_field_name: The name of the vector field (default: "vector")
Returns:
Dict containing the response
Example:
{
"code": 0,
"data": {}
}
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cluster_id | Yes | ||
| region_id | Yes | ||
| endpoint | Yes | ||
| collection_name | Yes | ||
| dimension | Yes | ||
| db_name | No | ||
| metric_type | No | COSINE | |
| id_type | No | Int64 | |
| auto_id | No | ||
| primary_field_name | No | id | |
| vector_field_name | No | vector |