milvus-logo

partition()

This method gets the specified partition object.

Invocation

partition(partition_name)

Parameters

ParameterDescriptionTypeRequired
partition_nameName of the partition to getStringtrue

Return

The specified partition object.

Raises

  • CollectionNotExistException: error if the collection does not exist.
  • BaseException: error if the specified partition does not exist.

Example

from pymilvus import Collection
collection = Collection("book")      # Get an existing collection.
collection.partition("novel")