Bulk Delete by ID

In C#, I have a list of Ids that I want to delete:

List Ids;
foreach (var Id in Ids)
{
MyElasticClient.Delete(Id);
}

how can I achieve it as fast as possible through a bulk operation?

In my opinion:
create DeleteRequest , it can add one element you want delete if you know id., appear in foreach.
create BulkRequestBuilder it add one deleteRequest in the end in one foreach.

and finally, excute BulkRequest

like this :slight_smile:
create BulkRequestBuilder
foreach (var Id in Ids)
{
DeleteRequest = .... element have id you want delete;
BulkRequestBuilder add DeleteRequest ;
}

excute BulkRequestBuilder

Hi,

I do not see how to create the bulk request in C#; I have really a lot of trouble to find any relevant example in the documentation...

Do you have a link you could suggest that shows the process?

thanks,
Thomas.