🚀 Try Zilliz Cloud, the fully managed Milvus, for free—experience 10x faster performance! Try Now>>

milvus-logo
LFAI
< Docs
  • Python

create_alias()

This method specifies an alias for a collection. Alias cannot be duplicated. Same alias cannot be assigned to different collections. Instead, you can specify multiple aliases for each collection.

Invocation

create_alias(collection_name, alias, timeout=None, using='default')

Parameters

ParameterDescriptionTypeRequired
collection_nameName of the collection to create aliasStringTrue
aliasAlias to createStringTrue
timeoutAn optional duration of time in seconds to allow for the RPC. If it is set to None, the client keeps waiting until the server responds or error occurs.FloatFalse
usingMilvus Connection used to check the segmentsStringFalse

Return

No return.

Raises

  • CollectionNotExistException: error if the collection does not exist.
  • BaseException: error if failed to create the alias.

Try Managed Milvus for Free

Zilliz Cloud is hassle-free, powered by Milvus and 10x faster.

Get Started
Feedback

Was this page helpful?