milvus-logo
LFAI
< Docs
  • Python

partition()

This method gets the specified partition object.

Invocation

partition(partition_name)

Parameters

ParameterDescriptionTypeRequired
partition_nameName of the partition to get.Stringtrue

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")
Feedback

Was this page helpful?