Table/Index 내 특정 데이터 제거하는 법. (pk(id) 기준 데이터 삭제)
PostgreSQL
DELETE FROM {table name} where id={id}
Milvus
from pymilvus import connections, utility
connections.connect(
... alias="default",
... user="username",
... password="password",
... host="10.130.198.14",
... port="19530",
... )
expr = "id=={id}"
collection = Collection({collection_name})
collection.delete(expr)
from elasticsearch import Elasticsearch
es = Elasticsearch(
... "{IP}",
... verify_certs=False,
... timeout=100,
... max_retries=10,
... retry_on_timeout=True,
... )
es.delete(index={index_name}, id={id})