1

I am looking to delete a document by query using jest client. In elastic search 2.0 it can be done by adding delete by query plugin and by writing the code

DeleteByQuery deleteAllUserJohn = new DeleteByQuery.Builder("{\"user               \":\"john\"}")
        .addIndex("users")
        .addType("user")
        .build();
client.execute(deleteAllUserJohn);

But this is not supporting in elastic 5.5. There should be solution for this but I am not getting it after lots of searching. Please suggest how to do this or if there any link for that please let me know.

Thank you

Nkosi
  • 235,767
  • 35
  • 427
  • 472
Ash
  • 149
  • 1
  • 1
  • 13

0 Answers0