query
Filter and retrieve data from a Milvus vector database collection using boolean expressions to find specific records based on defined criteria.
Instructions
Conduct a filtering on the scalar field with a specified boolean 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
filter: The filter used to find matches for the search
db_name: The name of the database. Pass explicit dbName or leave empty when cluster is free or serverless
output_fields: An array of fields to return along with the query results
partition_names: The name of the partitions to which this operation applies. If not set, the operation applies to all partitions in the collection
limit: The total number of entities to return (default: 100). The sum of this value and offset should be less than 16,384
offset: The number of records to skip in the search result. The sum of this value and limit should be less than 16,384
Returns:
Dict containing the query results
Example:
{
"code": 0,
"cost": 0,
"data": [
{
"color": "red_7025",
"id": 1
},
{
"color": "red_4794",
"id": 4
},
{
"color": "red_9392",
"id": 6
}
]
}
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cluster_id | Yes | ||
| region_id | Yes | ||
| endpoint | Yes | ||
| collection_name | Yes | ||
| filter | Yes | ||
| db_name | No | ||
| output_fields | No | ||
| partition_names | No | ||
| limit | No | ||
| offset | No |