My requirement is to delete a particular document (with doc_id) from multiple indices in one go. But the catch is that I am not aware which all indices would have this doc and I will have to fire a delete request for the doc_id to all indices present in the system.
When I tried to delete via bulk API by passing index and doc id, I was getting request too big error (status code: 429). The only alternative I could think of is to send a single delete request (DeleteByQuery) containing all indices which have to be considered.
My query is that whether DeleteByQuery is costlier than Delete by Doc ID and Index when it touches all the indices present?
Is there any alternative approach I could give a shot?
Cluster Info -
- 2 data nodes.
- 318 indices.
- 1 shard per node.
- 1 Lakh documents in total (not per client).