milvus-logo

hasCollection()

This method checks if a specified collection exists.

Invocation

new milvusClient(MILUVS_ADDRESS).collectionManager.hasCollection(
  HasCollectionReq
);

Parameters

HasCollectionReq

ParameterDescriptionTypeRequired
collection_nameName of the collection to checkStringTrue
timeoutAn optional duration of time in millisecond to allow for the RPC. Default is undefinedNumberFalse

Example

new milvusClient(MILUVS_ADDRESS).collectionManager.hasCollection({
  collection_name: "my_collection",
});

Return

// hasCollection return
{ status: { error_code: 'Success', reason: '' }, value: true }