search
Find similar vector embeddings in Zilliz Cloud collections using vector similarity search with optional filtering and result customization.
Instructions
Conduct a vector similarity search with an optional scalar filtering expression.
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 which this operation applies
data: A list of vector embeddings. Zilliz Cloud searches for the most similar vector embeddings to the specified ones
anns_field: The name of the vector field
limit: The total number of entities to return (default: 10). The sum of this value and offset should be less than 100
db_name: The name of the database. Pass explicit dbName or leave empty when cluster is free or serverless
filter: The filter used to find matches for the search
offset: The number of records to skip in the search result. The sum of this value and limit should be less than 16,384
grouping_field: The name of the field that serves as the aggregation criteria
output_fields: An array of fields to return along with the search results
metric_type: The name of the metric type that applies to the current search (L2, IP, COSINE)
search_params: Extra search parameters including radius and range_filter
partition_names: The name of the partitions to which this operation applies
consistency_level: The consistency level of the search operation (Strong, Eventually, Bounded)
Returns:
Dict containing the search results
Example:
{
"code": 0,
"data": [
{
"color": "orange_6781",
"distance": 1,
"id": 448300048035776800
},
{
"color": "red_4794",
"distance": 0.9353201,
"id": 448300048035776800
}
]
}
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cluster_id | Yes | ||
| region_id | Yes | ||
| endpoint | Yes | ||
| collection_name | Yes | ||
| data | Yes | ||
| anns_field | Yes | ||
| limit | No | ||
| db_name | No | ||
| filter | No | ||
| offset | No | ||
| grouping_field | No | ||
| output_fields | No | ||
| metric_type | No | ||
| search_params | No | ||
| partition_names | No | ||
| consistency_level | No |