Skip to content

PyMilvus 2.2.0 Release Notes

Compare
Choose a tag to compare
@XuanYang-cn XuanYang-cn released this 18 Nov 09:03
b268bcd

PyMilvus API changes between PyMilvus2.2 and PyMilvus2.1

1. New APIs

Support RBAC (Role Based Access Control)

Renamed APIs in utility

Methods in 2.1.x Methods in 2.2.x
utility.create_credential utility.create_user
[No change]utility.reset_password utility.reset_password
utility.update_credential utility.update_password
utility.delete_credential utility.delete_user
utility.list_cred_users utility.list_usernames
- utility.list_roles
- utility.list_user
- utility.list_users

New class Role

  • property:
    • Role.name
  • methods:
    • Role.create
    • Role.drop
    • Role.add_user
    • Role.remove_user
    • Role.get_users
    • Role.is_exist
    • Role.grant
    • Role.revoke
    • Role.list_grant
    • Role.list_grants

Support bulk insert data

  1. utility.do_bulk_insert
  2. utility.get_bulk_insert_state
  3. utility.list_bulk_insert_tasks

Add flush

  1. Collection.flush()

2. More functional and compatible APIs

Support search/query pagination

Support collection TTL (Time to Live)

Add properties support when init Collection

Collection(name="a", data=data, schema=schema, properties={"collection.ttl.seconds": 1800})

3. Enhanced APIs

num_entities doesn't invoke flush inside

create_index:

  • doesn't invoke flush inside.
  • support FLAT, DiskANN, and, AutoIndex index type
  • support naming an index
  • support to create index for string field

Collection.drop:

  • doesn't invoke Collection.release() and index.drop() inside.

4. Removed APIs

  1. calc_distance()