milvus-io / pymilvus

Python SDK for Milvus.
Apache License 2.0
1.03k stars 326 forks source link

[Enhancement]: Support _async parameter for query() #2343

Open yhmo opened 1 day ago

yhmo commented 1 day ago

Is there an existing issue for this?

What would you like to be added?

Add _async parameter for query() interface, just like the other interfaces such as search/insert/load

Currently, the query() always wait the result: https://github.com/milvus-io/pymilvus/blob/31101398e30245a279e707abcef1d92d24ae99e5/pymilvus/client/grpc_handler.py#L1539

Why is this needed?

No response

Anything else?

No response

yhmo commented 1 day ago

We can create a new class AsyncMilvusClient to support python native async/await interfaces.

The pymilvus/asyncio/client/grpc_handler.py in this pr could be helpful: https://github.com/milvus-io/pymilvus/pull/1273/files