Skip to content

Commit

Permalink
feat: support alter index
Browse files Browse the repository at this point in the history
Signed-off-by: yah01 <[email protected]>
  • Loading branch information
yah01 committed Dec 28, 2023
1 parent 2b5a27d commit c8d203d
Show file tree
Hide file tree
Showing 4 changed files with 192 additions and 45 deletions.
18 changes: 18 additions & 0 deletions pymilvus/client/grpc_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,24 @@ def _check():
raise MilvusException(message=fail_reason)

return Status(status.code, status.reason)

@retry_on_rpc_failure()
def alter_index(
self,
collection_name: str,
index_name: str,
extra_params: dict,
timeout: Optional[float] = None,
**kwargs,
):
check_pass_param(collection_name=collection_name)
request = Prepare.alter_index_request(collection_name, index_name, extra_params)

rf = self._stub.AlterIndex.future(request, timeout=timeout)
response = rf.result()
status = response.status
check_status(status)
return Status(status.code, status.reason)

@retry_on_rpc_failure()
def list_indexes(self, collection_name: str, timeout: Optional[float] = None, **kwargs):
Expand Down
Loading

0 comments on commit c8d203d

Please sign in to comment.