This topic describes how to drop a collection and the data within.
Dropping a collection irreversibly deletes all data within it.
from pymilvus import utility
utility.drop_collection("book")
await milvusClient.dropCollection({ collection_name: "book" });
err = milvusClient.DropCollection(
context.Background(),
"book",
)
if err != nil {
log.Fatal("fail to drop collection:", err.Error())
}
milvusClient.dropCollection(
DropCollectionParam.newBuilder()
.withCollectionName("book")
.build()
);
var collection = Client.GetCollection("book");
await collection.DropAsync();
curl -X 'DELETE' \
'${MILVUS_HOST}:${MILVUS_PORT}/v1/vector/collections/drop' \
-H 'Authorization: Bearer ${TOKEN}' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"collection_name": "book"
}'
Output:
{
"code": 200,
"data": {}
}
Parameter |
Description |
collection_name |
Name of the collection to drop. |
Parameter |
Description |
collection_name |
Name of the collection to drop. |
Parameter |
Description |
ctx |
Context to control API invocation process. |
CollectionName |
Name of the collection to drop. |
Parameter |
Description |
CollectionName |
Name of the collection to drop. |
Parameter |
Description |
collectionName |
Name of the collection to drop. |
- Learn more basic operations of Milvus: