milvus-logo
LFAI
< Docs
  • Java

listPartitions()

This operation lists the partitions in a specified collection.

public List<String> listPartitions(ListPartitionsReq request)

Request Syntax

listPartitions(ListPartitionsReq.builder()
    .collectionName(String collectionName)
    .build()
)

BUILDER METHODS:

  • collectionName(String collectionName)

    The name of an existing collection.

RETURN TYPE:

List<String>

RETURNS:

A list of partition names.

EXCEPTIONS:

  • MilvusClientExceptions

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

Example

// list partitions in collection
ListPartitionsReq listPartitionsReq = ListPartitionsReq.builder()
        .collectionName("test")
        .build();
List<String> res = client.listPartitions(listPartitionsReq);

Try Managed Milvus for Free

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

Get Started
Feedback

Was this page helpful?