Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance: alterindex & altercollection supports altering properties #2432

Merged
merged 8 commits into from
Dec 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
milvusclient add interface altercollection
Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
JsDove committed Dec 12, 2024
commit e9112eee527dfec15daaaf2ca88d25c2f73a50fd
42 changes: 41 additions & 1 deletion pymilvus/milvus_client/milvus_client.py
Original file line number Diff line number Diff line change
@@ -833,7 +833,7 @@ def describe_index(
) -> Dict:
conn = self._get_connection()
return conn.describe_index(collection_name, index_name, timeout=timeout, **kwargs)

def alter_index_properties(
self,
collection_name: str,
@@ -860,6 +860,46 @@ def drop_index_properties(
collection_name, index_name, delete_keys=delete_keys, timeout=timeout, **kwargs
)

def alter_collection_properties(
self, collection_name: str, properties: dict, timeout: Optional[float] = None, **kwargs
):
conn = self._get_connection()
conn.alter_collection_properties(
collection_name,
properties=properties,
timeout=timeout,
**kwargs,
)

def drop_collection_properties(
self,
collection_name: str,
delete_keys: list[str],
timeout: Optional[float] = None,
**kwargs,
):
conn = self._get_connection()
conn.drop_collection_properties(
collection_name, delete_keys=delete_keys, timeout=timeout, **kwargs
)

def alter_collection_field_properties(
self,
collection_name: str,
field_name: str,
field_param: dict,
timeout: Optional[float] = None,
**kwargs,
):
conn = self._get_connection()
conn.alter_collection_field_properties(
collection_name,
field_name=field_name,
field_param=field_param,
timeout=timeout,
**kwargs,
)

def create_partition(
self, collection_name: str, partition_name: str, timeout: Optional[float] = None, **kwargs
):