Elasticsearch DeleteByQuery not working, getting 400 bad request Elasticsearch DeleteByQuery not working, getting 400 bad request elasticsearch elasticsearch

Elasticsearch DeleteByQuery not working, getting 400 bad request


It sounds like you may be using Elasticsearch 2.x in conjunction with NEST 2.x. As part of Elasticsearch 2.0, Delete by query was moved out of Elasticsearch core and into a separate plugin that needs to be installed. You can install the plugin using the following command within the Elasticsearch bin directory

bin/plugin install delete-by-query

Starting up the node again, Delete by query should now work as expected.

If you ever need to get more details about why a request has failed, you can inspect the .DebugInformation on the response to get the audit trail for the request.