i'm using delete by query plugins for elastic search.
I have a index products
with a integer field size
. I want delete all document with size 10. I have over 5000 documents with size 10. If i try:
DELETE /products/product/_query?q=size:10
this query requires over 2 minutes.
I understand because delete by query
plugin is slow, from documentation:
Internally, it uses Scroll and Bulk APIs to delete documents in an efficient and safe manner. It is slower [..] Queries which match large numbers of documents may run for a long time, as every document has to be deleted individually.
How do i perform a fastest documents mass deleting?