删除集合

方案一:

def delete_collection():
    from pymilvus import utility
    utility.drop_collection(settings.MILVUS_CONFIG.collection.name)

方案二:

from core.milvus.models import collection

conn = connections._fetch_handler('default')

if conn.has_collection(settings.MILVUS_CONFIG.collection.name):
    logger.debug('集合已存在')
    collection.drop()

universe_king
3.4k 声望678 粉丝