milvus-logo

createAlias()

This method creates a alias for a collection.

Invocation

new milvusClient(MILUVS_ADDRESS).collectionManager.createAlias(CreateAliasReq);

Parameters

CreateAliasReq(object)

ParameterDescriptionTypeRequired
collection_nameTarget collection nameStringTrue
AliasAlias nameStringTrue
timeoutAn optional duration of time in millisecond to allow for the RPC. Default is undefinedNumberFalse

Example

new milvusClient(MILUVS_ADDRESS).collectionManager.createAlias({
  collection_name: "my_collection",
  alias: "my_alias",
});

Return

// create collection return
{ error_code: 'Success', reason: '' }