milvus-logo
LFAI
< Docs
  • Python

load()

This method loads the specified collection to memory (for search or query).

Invocation

load(partition_names=None, timeout=None, **kwargs)

Parameters

ParameterDescriptionTypeRequired
partition_namesName of the partition(s) to load.list[String]False
timeoutAn optional duration of time in seconds to allow for the RPC. If it is set to None, the client keeps waiting until the server responds or error occurs.FloatFalse
kwargs: _asyncBoolean value to indicate if to invoke this method asynchronously.BoolFalse

Return

No return.

Raises

  • CollectionNotExistException: error if the collection does not exist.
  • ParamError: error if the parameters are invalid.
  • BaseException: error if the specified partition does not exist.

Example

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

Try Managed Milvus for Free

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

Get Started
Feedback

Was this page helpful?