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 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
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.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.