Skip to main content

dropPartition()

This operation drops a specified partition from the current collection.

Before dropping a partition, you must first release it.

public void dropPartition(DropPartitionReq request)

Request Syntax

dropPartition(DropPartitionReq.builder()
.collectionName(String collectionName)
.partitionName(String partitionName)
.build()
)

BUILDER METHODS:

  • collectionName(String collectionName)

    (Required) The name of an existing collection.

  • partitionName(String partitionName)

    (Required) The name of the partition to drop.

RETURNS:

void

EXCEPTIONS:

  • MilvusClientExceptions

    This exception will be raised when any error occurs during this operation.

Example

DropPartitionReq dropPartitionReq = DropPartitionReq.builder()
.collectionName("test")
.partitionName("test_partition")
.build();
client.dropPartition(dropPartitionReq);