Elasticsearch · Arazzo Workflow
Elasticsearch Purge a Document by Business Key
Version 1.0.0
Locate a document by a business key, delete it by its internal id, and prove it is no longer retrievable or searchable.
Provider
Workflows
purge-document
Find a document by business key, delete it, and verify it is unreachable by both get and search.
Resolves a document id from a business key, deletes the document, and confirms the deletion with a direct get expecting 404 and a repeat search expecting zero hits.
1
locateDocument
searchDsl
Resolve the internal document id from the business key with a term query. The workflow requires exactly a match here; a zero-hit result fails the step because there is nothing to purge.
2
deleteDocument
deleteDocument
Delete the located document by its internal id.
3
verifyGetFails
getDocument
Attempt a direct get of the deleted id. A 404 is the required outcome and is the first half of the erasure evidence.
4
verifySearchEmpty
searchDsl
Re-run the original business key query. Zero hits is the required outcome and is the second half of the erasure evidence, confirming the document is gone from the searchable view and not only from direct retrieval.