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

Try Managed Milvus for Free

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

Get Started
Feedback

Was this page helpful?