diff --git a/pymilvus/client/grpc_handler.py b/pymilvus/client/grpc_handler.py index d7b8ba84c..f34679479 100644 --- a/pymilvus/client/grpc_handler.py +++ b/pymilvus/client/grpc_handler.py @@ -721,7 +721,7 @@ def create_index( if field_name != fields["name"]: continue valid_field = True - if fields["type"] != DataType.FLOAT_VECTOR and fields["type"] != DataType.BINARY_VECTOR: + if fields["type"] not in {DataType.FLOAT_VECTOR, DataType.BINARY_VECTOR}: break if not valid_field: diff --git a/pymilvus/decorators.py b/pymilvus/decorators.py index d9b993ab3..f3d33fdc8 100644 --- a/pymilvus/decorators.py +++ b/pymilvus/decorators.py @@ -74,6 +74,7 @@ def timeout(start_time: Optional[float] = None) -> bool: grpc.StatusCode.UNAUTHENTICATED, grpc.StatusCode.INVALID_ARGUMENT, grpc.StatusCode.ALREADY_EXISTS, + grpc.StatusCode.RESOURCE_EXHAUSTED, ): raise MilvusException(message=str(e)) from e if timeout(start_time):