milvus-logo
LFAI
< Docs
  • Python

flush()

This method seals all entities in the current collection. Any insertion after a flush operation results in generating new segments. Note that only sealed segments can be indexed.

Invocation

flush(
    collection_name,
    timeout
)

Parameters

ParameterDescriptionTypeRequired
collection_nameName of the collection to flush.StringTrue
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

Return

None

Raises

None

Example

from pymilvus import MilvusClient

client = MilvusClient(uri, token)

client.flush(collection_name='my-collection')