Fix delete by query

This is a workaround for the internal changes in ES to do with delete by query.

I had to change the test case to use a matchQuery instead of a simple string query to get it to work. I don't think this is a bug at our end but something that has changed in ES (I couldn't get delete by a query to work with a simple string on the REST API either).