Milvus Search

Milvus Search

Certified

Search for similar vectors in a Milvus collection

Runs an approximate nearest-neighbor vector similarity search, optionally narrowed with a scalar filter expression.

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

Search for the 5 nearest neighbors of a query vector.

yaml
id: milvus_search
namespace: company.team

tasks:
  - id: search
    type: io.kestra.plugin.milvus.Search
    uri: http://localhost:19530
    token: "{{ secret('MILVUS_TOKEN') }}"
    collectionName: documents
    vector: [0.05, 0.61, 0.76, 0.74]
    limit: 5
Properties

Collection name

The name of the collection to search.

Milvus server URI

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

SubTypenumber

Query vector

The dense vector to search nearest neighbors for, as a list of numbers matching the collection's vector dimension.

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
Possible Values
STRONGSESSIONBOUNDEDEVENTUALLY

Consistency level

The consistency level for this search. Unset by default, in which case the collection's own configured level applies (Bounded for quick-setup collections). One of:

  • STRONG: reads always see the latest data after a write completes.
  • SESSION: reads within the same session see the effects of writes from that session.
  • BOUNDED: reads see acknowledged writes and tolerate bounded staleness.
  • EVENTUALLY: reads are eventually consistent and may serve stale data. Set to STRONG when searching right after an Upsert or Delete, at the cost of search latency.

Database name

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

DefaultFETCH
Possible Values
STOREFETCHFETCH_ONENONE

Fetch type

How search results are returned: FETCH_ONE for the single best match, FETCH for all matches inline, STORE to write all matches to internal storage and return a URI. Defaults to FETCH.

Scalar filter expression

A Milvus boolean filter expression narrowing the search to rows matching the condition, e.g. "city == 'Berlin'". Unset by default (no filter applied).

Default10

Result limit

The maximum number of nearest neighbors to return. Defaults to 10, and must be between 1 and 16384.

SubTypestring

Output fields

Scalar fields to include in each result's entity map, in addition to the primary key and score. Defaults to none.

SubTypestring

Partition names

Optional partitions to scope the search to. Defaults to searching every partition.

Password

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

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.

Map containing the first row of fetched data.

Only populated if using fetchType=FETCH_ONE.

List containing the fetched data.

Only populated if using fetchType=FETCH.

The number of fetched rows.

Formaturi

Kestra's internal storage URI of the stored data.

Only populated if using fetchType=STORE.