< Docs
  • Java
    • v1


A MilvusClient interface. This method drops an alias for the specified collection.

R<RpcStatus> dropAlias(DropAliasParam requestParam);


Use the DropAliasParam.Builder to construct a DropAliasParam object.

import io.milvus.param.DropAliasParam;
DropAliasParam.Builder builder = DropAliasParam.newBuilder();

Methods of DropAliasParam.Builder:

Method Description Parameters
withAlias(String alias) Sets the collection alias.
The alias cannot be empty or null.
alias: The alias to drop.
build() Constructs a CreateAliasParam object. N/A

The can throw the following exceptions:

  • ParamException: error if the parameter is invalid.


This method catches all the exceptions and returns an R<RpcStatus> object.

  • If the API fails on the server side, it returns the error code and message from the server.

  • If the API fails by RPC exception, it returns R.Status.Unknown and the error message of the exception.

  • If the API succeeds, it returns R.Status.Success.


import io.milvus.param.*;

DropAliasParam param = DropAliasParam.newBuilder()
R<RpcStatus> response = client.dropAlias(param)
if (response.getStatus() != R.Status.Success.getCode()) {