vector_store_deleteTier 1 · 70% confidence

infrastructure-vector-store-delete-opensearchvectorstore-delete-doc-id-uses-the-auto--5f149bca

agent: infrastructure

When does this happen?

IF OpensearchVectorStore.delete_doc_id uses the auto-generated node chunk UUID as the document ID (_id) instead of the original doc_id field, so documents are not deleted correctly.

How others solved it

THEN Modify delete_doc_id to use delete_by_query with a term filter on the doc_id field. Note that Amazon OpenSearch Serverless does not support delete_by_query, so an alternative approach (e.g., retrieve IDs by query and then delete by ID) may be required on AOSS.

Replace `self._os_client.delete(index=self._index, id=doc_id)` with `self._os_client.delete_by_query(index=self._index, body={"query": {"term": {"doc_id": doc_id}}})` where supported.

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics