# Does \_delete\_by\_query need a plugin or not? ES version 5.5

**URL:** <https://discuss.elastic.co/t/does-delete-by-query-need-a-plugin-or-not-es-version-5-5/246343>\
**Category:** Elasticsearch\
**Created:** [August 25, 2020, 6:31pm UTC](https://discuss.elastic.co/t/does-delete-by-query-need-a-plugin-or-not-es-version-5-5/246343 "2020-08-25T18:31:05Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![makons](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/makons/32/74314_2.png) [@makons](https://discuss.elastic.co/u/makons)\
**Post date:** [August 26, 2020, 12:22pm UTC](https://discuss.elastic.co/t/does-delete-by-query-need-a-plugin-or-not-es-version-5-5/246343/3 "2020-08-26T12:22:17Z")

</div>

Thanks for the reply, as well as version change suggestion, I'll look into that!

So, my query is like this:

```auto
POST <index_name>/_delete_by_query?routing=<parent_type>
{
  "query" : {
    "bool" : {
      "must_not" : [
        {
          "has_parent" : {
            "query" : {
              "match_all" : {
                "boost" : 1.0
              }
            },
            "parent_type" : <parent_type>,
            "score" : false,
            "ignore_unmapped" : false,
            "boost" : 1.0
          }
        }
      ],
      "disable_coord" : false,
      "adjust_pure_negative" : true,
      "boost" : 1.0
    }
  }
}

```

I've tried both that and `POST <index_name>/<child_type>/_delete_by_query?routing=<parent_type>` with the same query. When child type is specified, the record is inserted in the ES with `_id="_delete_by_query"`, but when I leave it out I get that `invalid_type_name_exception`.

However, I did decent amount of digging and found [this topic](https://discuss.elastic.co/t/delete-by-query-api-invalid-type-name-exception/169420) that seems to be related to my issue. I indeed run an embedded instance for testing purposes, and `_delete_by_query` is not supported there. The workaround mentioned was to include reindex plugin in the elasticsearch configuration. I haven't been able to make that workaround work, but in the end, as the last comment on that thread says, it's not a reliable solution.

In the end, I'll most likely drop this unit test that I had trouble with, and only rely on the integration test that uses a standalone elasticsearch server, which does support `_delete_by_query`.

---

_[View the full topic](https://discuss.elastic.co/t/does-delete-by-query-need-a-plugin-or-not-es-version-5-5/246343)._
