query()
This method conducts a vector query.
Invocation
new milvusClient(MILUVS_ADDRESS).dataManager.query(QueryReq);
Parameters
QueryReq
Parameter | Description | Type | Required |
---|---|---|---|
collection_name | Name of the collection to search on | String | True |
output_fields | Vector or scalar field to be returned | String[] | True |
expr(optional) | Boolean expression to filter the data | String | False |
partitions_names(optional) | An array of the names of the partitions to search on. | String[] | Talse |
Example
new milvusClient(MILUVS_ADDRESS).dataManager.query({
collection_name: "my_collection",
expr: "age > 0",
output_fields: ["age"],
});
Return
// query return
{
status: { error_code: 'Success', reason: '' },
data: [
{ age: '434848878802248081' },
...999 more items,
]
}