milvus_cli icon indicating copy to clipboard operation
milvus_cli copied to clipboard

Support a non-interactive mode so that it is possible to build scripts with the milvus_cli

Open JakeSummers opened this issue 1 year ago • 4 comments

I would like to create a bash script that does something like this:


MY_INDEX_VALUE=$1

milvus_cli connect -uri http://localhost:19530
milvus_cli use database my_database

milvus_cli query \ 
    --collection my_collection 
    --query "MY_INDEX=$MY_INDEX_VALUE"
    --fields "MY_INDEX, MY_EMBEDDING"

Currently only interactive mode is supported.

JakeSummers avatar May 07 '24 01:05 JakeSummers

This would also make it easier to use the currently unusable commands like query. See #78.

JakeSummers avatar May 07 '24 02:05 JakeSummers

CLI is designed for interactive applications base on pymilvus. You can using pymilvus directly in bash. Is that meet your requirements?

nameczz avatar May 07 '24 03:05 nameczz

@nameczz

You can using pymilvus directly in bash. Is that meet your requirements?

Can you provide me with an example or point me to the doc?

JakeSummers avatar May 08 '24 14:05 JakeSummers

@JakeSummers Sure https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Vector/query.md image

nameczz avatar May 09 '24 08:05 nameczz