Milvus CreateCollection

Milvus CreateCollection

Certified

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.

yaml
type: io.kestra.plugin.milvus.CreateCollection

Create a collection for 768-dimension embeddings with cosine similarity.

yaml
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

Collection name

The name of the collection to create.

Vector dimension

The number of dimensions of the vectors stored in this collection's vector field. Must be between 1 and 32768.

Milvus server URI

The URI of the Milvus server or Zilliz Cloud endpoint, e.g. http://localhost: 19530.

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.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset 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.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
Defaultfalse

Auto-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.

Collection description

A free-text description of the collection, stored as Milvus collection metadata. Defaults to empty.

Database name

The Milvus database to operate against. Defaults to the server's default database when not set.

DefaultINT64
Possible Values
INT64VARCHAR

Primary 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.

DefaultCOSINE
Possible Values
COSINEL2IP

Metric type

The similarity metric used for vector search on this collection. One of COSINE, L2 or IP. Defaults to COSINE.

Password

Password for a self-hosted Milvus instance with username/password authentication enabled.

Defaultid

Primary field name

The name of the primary key field. Defaults to "id".

API token

The API token for authentication, typically used with Zilliz Cloud or a Milvus instance with token-based auth enabled.

Username

Username for a self-hosted Milvus instance with username/password authentication enabled. Leave unset if using a token or an unauthenticated instance.

Defaultvector

Vector field name

The name of the vector field. Defaults to "vector".