Skip to content

PyMilvus 2.3.7 Release Notes

Compare
Choose a tag to compare
@czs007 czs007 released this 13 Mar 09:44
· 5 commits to 2.3 since this release
e024793

MilvusClient provides a simple and easy-to-use alternative to the legacy ORM approach. It adopts a purely functional approach to simplify interactions with the server. Each MilvusClient establishes a gRPC connection to the server you specified. To set up multiple connections, you can create multiple MilvusClient instances.

Install & Update

You can run the following command to install the latest PyMilvus or update your PyMilvus to this version.

pip install --upgrade pymilvus==v2.3.7

After the installation, you can check the pymilvus version by running the following

from pymilvus import __version__

print(__version__)

#v2.3.7

Connect to Milvus

from pymilvus import MilvusClient

# Authentication not enabled
client = MilvusClient("http://localhost:19530")

# Authentication enabled with the root user
client = MilvusClient(
    uri="http://localhost:19530",
    token="root:Milvus",
    db_name="default"
)

# Authentication enabled with a non-root user
client = MilvusClient(
    uri="http://localhost:19530",
    token="user:password", # replace this with your token
    db_name="default"
)

What's New

In this version, PyMilvus adds a MilvusClient module that incorporates several functional methods, aligning its functionality overall with that of the legacy ORM module.

Collection-related methods

  • create_collection()
  • rename_collection()
  • describe_collection()
  • has_collection()
  • list_collections()
  • drop_collection()
  • get_collection_stats()
  • load_collection()
  • release_collection()
  • get_load_state()
  • refresh_load()

Data-related methods

  • insert()
  • upsert()
  • search()
  • query()
  • delete()

Alias-related methods

  • create_alias()
  • drop_alias()
  • alter_alias()
  • describe_alias()
  • list_aliases()

Partition-related methods

  • create_partition()
  • drop_partition()
  • has_partition()
  • list_partitions()
  • load_partitions()
  • release_partitions()
  • get_partition_stats()

Index-related methods

  • create_index()
  • list_indexes()
  • drop_index
  • describe_index()

User- and RBAC-related methods

  • create_user()
  • drop_user()
  • update_password()
  • list_users()
  • describe_user()
  • grant_role()
  • revoke_role()
  • create_role()
  • drop_role()
  • describe_role()
  • list_roles()
  • grant_privilege()
  • revoke_privilege()

Examples

In addition to the documents, you can also refer to the example sets in our GitHub repo.

Feedback & Issues

If you are having trouble or have questions about PyMilvus, ask your question on our PyMilvus Community Forum. Once you get an answer, it’d be great if you could work it back into this documentation and contribute!

Contributions

We are committed to building a collaborative, exuberant open-source community for PyMilvus. Therefore, contributions to PyMilvus are welcome from everyone. Refer to Contributing Guideline before making contributions to this project. You can file an issue or contact us on Slack if you need any assistance or want to propose your ideas about PyMilvus.