I am using ElastciSearch 2.3.0
I am trying to delete documents from the ElasticSearch using .net and NEST for specific index.
I only want to delete all documents and not the _mapping
DeleteByQueryRequest r = new DeleteByQueryRequest(new IndexName() { Name = indexName });
r.QueryOnQueryString = "*";
var response = client.DeleteByQuery(r);
I am try to do this by using above code but it is not working.
Please suggest on what's wrong with the above code or how this can be done.
Thanks for your help in advance.
It worked. Thanks a lot.
Don't use delete by query it was made a plugin since elastic 2.0 for a good reason. You can get out of memory exceptions easy. You should delete the whole index and recreate the mappings
Raw copy of index
If you really need to install the plug-in sudo bin/plugin install delete-by-query