
Milvus CreateCollection
CertifiedCreate a Milvus collection
Milvus CreateCollection
Create a Milvus collection
Creates a collection with a single vector field and a primary key field, using Milvus's quick-setup schema. For a custom multi-field schema, create the collection with the Milvus SDK or console first and use the Upsert, Search, and Delete tasks against it directly.
type: io.kestra.plugin.milvus.CreateCollectionExamples
Create a collection for 768-dimension embeddings with cosine similarity.
id: milvus_create_collection
namespace: company.team
tasks:
- id: create_collection
type: io.kestra.plugin.milvus.CreateCollection
uri: http://localhost:19530
token: "{{ secret('MILVUS_TOKEN') }}"
collectionName: documents
dimension: 768
Properties
collectionName *string
Collection name
The name of the collection to create.
dimension *integerstring
Vector dimension
The number of dimensions of the vectors stored in this collection's vector field. Must be between 1 and 32768.
uri *string
Milvus server URI
The URI of the Milvus server or Zilliz Cloud endpoint, e.g. http://localhost: 19530.
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150autoId booleanstring
falseAuto-generate IDs
When true, Milvus assigns the primary key automatically and it must be omitted on insert. Only valid when idType is INT64. Defaults to false.
collectionDescription string
Collection description
A free-text description of the collection, stored as Milvus collection metadata. Defaults to empty.
databaseName string
Database name
The Milvus database to operate against. Defaults to the server's default database when not set.
idType string
INT64INT64VARCHARPrimary key type
The data type of the primary key field. One of INT64 (auto-incrementing when autoId is true) or VARCHAR (requires the caller to supply an id on insert). Defaults to INT64.
metricType string
COSINECOSINEL2IPMetric type
The similarity metric used for vector search on this collection. One of COSINE, L2 or IP. Defaults to COSINE.
password string
Password
Password for a self-hosted Milvus instance with username/password authentication enabled.
primaryFieldName string
idPrimary field name
The name of the primary key field. Defaults to "id".
token string
API token
The API token for authentication, typically used with Zilliz Cloud or a Milvus instance with token-based auth enabled.
username string
Username
Username for a self-hosted Milvus instance with username/password authentication enabled. Leave unset if using a token or an unauthenticated instance.
vectorFieldName string
vectorVector field name
The name of the vector field. Defaults to "vector".