milvus-logo

drop_index()

This method drops the index and its corresponding index file in the collection.

Invocation

drop_index(timeout=None, **kwargs)

Parameters

ParameterDescriptionTypeRequired
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
index_nameIf not specified, the default value of index_name is "_default_idx_"StringFalse

Return

No return.

Raises

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

Example

from pymilvus import Collection
collection = Collection("book")      # Get an existing collection.
collection.drop_index(index_name="vec_index")