Bulk delete in elasticsearch

If I have a list of ids can I bulk delete those documents with ids?

Yes you can. See https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html

in this link delete by id works. do we have same method for ruby as well?

I don't know. I'm not writing ruby code :smiley:

okay no problem :smiley:. I had one doubt about the scroll. Once we make a request to ES about scrolling it returns a scroll id. Do we need to close this scroll request?

It's not related. Is it?

No it's not. sorry. I did not understand bulk part in that. How can I send multiple ids to be deleted? I dont understand what to be sent.

This:

POST test/_bulk
{ "delete" : { "_id" : "1" } }
{ "delete" : { "_id" : "2" } }
{ "delete" : { "_id" : "3" } }

thanks this is helpful.

If I have to send this body from code (using http.post method). each entry would be a different element in the array, right?

for example

body[0] = { "delete" : { "_id" : "1" } }
body[1] = { "delete" : { "_id" : "2" } }

No idea. I'm a Java dev.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.