ErrorHandling when using BulkProcessor for delete


I am Using BulkProcessor for bulk delete.
How do I get errors if any of the bulks failed?
Is there an Exception thrown?
Is there any way to see the bulk, and deleteRequests that failed?

(Camilo Sierra) #2

hello @aasher! when you use bulk, examle in php you call function $res = $this->client->bulk($data); in @res you have one response for each document that you send, and in the [delete][status] you have code 200 if it works or 400 if it fails, you have also the message why line doesn't work. and they are not exeption thrown, because even if a request fails in the middle all the other request after and before will work.

(Camilo Sierra) #3

even if you dont use any lib (java, php..) but you use curl in your shell you have the same answer !


Hello Camilo_Siera! Thank you very much for the quick response.
I have to user BulkProcessor.add(DeleteRequest)
and not using BulkRequest.
The questionis, how do I get the response in this way.
Thanks again,

(Antonio Bonuccelli) #5


see here , specifically number 3 and 4


Thank you! Exactly what I needed.


Another thing.
What is the best way to handle the errors. I am getting from BulkRequest the list if the ActionRequest. I need to save those requests for further handling ( maybe try the action again after some time ). How do I save the data? I am using oracle DB.


(Antonio Bonuccelli) #8

We can't easily tell whether part of the request was successful or or all of it completely failed, say for instance you get a network disconnect.

Probably just repeat the entire request is the way to go.

(system) #9