
Milvus Search
CertifiedSearch for similar vectors in a Milvus collection
Milvus Search
Search for similar vectors in a Milvus collection
Runs an approximate nearest-neighbor vector similarity search, optionally narrowed with a scalar filter expression.
type: io.kestra.plugin.milvus.SearchExamples
Search for the 5 nearest neighbors of a query vector.
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
collectionName *string
Collection name
The name of the collection to search.
uri *string
Milvus server URI
The URI of the Milvus server or Zilliz Cloud endpoint, e.g. http://localhost: 19530.
vector *array
Query vector
The dense vector to search nearest neighbors for, as a list of numbers matching the collection's vector dimension.
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
{}1150consistencyLevel string
STRONGSESSIONBOUNDEDEVENTUALLYConsistency 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.
databaseName string
Database name
The Milvus database to operate against. Defaults to the server's default database when not set.
fetchType string
FETCHSTOREFETCHFETCH_ONENONEFetch 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.
filter string
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).
limit integerstring
10Result limit
The maximum number of nearest neighbors to return. Defaults to 10, and must be between 1 and 16384.
outputFields array
Output fields
Scalar fields to include in each result's entity map, in addition to the primary key and score. Defaults to none.
partitionNames array
Partition names
Optional partitions to scope the search to. Defaults to searching every partition.
password string
Password
Password for a self-hosted Milvus instance with username/password authentication enabled.
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.
Outputs
row object
Map containing the first row of fetched data.
Only populated if using fetchType=FETCH_ONE.
rows array
List containing the fetched data.
Only populated if using fetchType=FETCH.
size integer
The number of fetched rows.
uri string
uriKestra's internal storage URI of the stored data.
Only populated if using fetchType=STORE.