I need to create a function to merge documents. I know how to update a document for merging but I don't want to send another request for deleting document being merged.
In Painless script, is it possible to find and delete another document by query or id?