# Where to set destructive\_requires\_name

**URL:** <https://discuss.elastic.co/t/where-to-set-destructive-requires-name/84821>\
**Category:** Elasticsearch\
**Created:** [May 6, 2017, 1:59pm UTC](https://discuss.elastic.co/t/where-to-set-destructive-requires-name/84821 "2017-05-06T13:59:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![snigdha](https://avatars.discourse-cdn.com/v4/letter/s/c6cbf5/32.png) [@snigdha](https://discuss.elastic.co/u/snigdha)\
**Post date:** [May 6, 2017, 1:59pm UTC](https://discuss.elastic.co/t/where-to-set-destructive-requires-name/84821/1 "2017-05-06T13:59:12Z")

</div>

Hi All,

I am new to Elasticsearch. I am currently trying to disable delete\* and I read in the documentation that in order to do that I need to set destructive\_requires\_name to true. I wrote the following code using Nest client-

```
            .Settings(s => s
            .Setting("index.mapping.depth.limit", 22)
            .Setting("action.destructive_requires_name", true)

```

However got the following error-  
unknown setting [index.action.destructive\_requires\_name] please check that any required plugins are installed, or check the breaking changes documentation for removed settings

It's obvious from the error that it's not the correct way, but unfortunately I couldn't find how can I set it right. Can anyone please help?

Tia!

---

<div class="post-metadata">

**Author:** ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)\
**Post date:** [May 6, 2017, 2:20pm UTC](https://discuss.elastic.co/t/where-to-set-destructive-requires-name/84821/2 "2017-05-06T14:20:55Z")

</div>

This is a setting that goes into elasticsearch.yml

---

<div class="post-metadata">

**Author:** ![snigdha](https://avatars.discourse-cdn.com/v4/letter/s/c6cbf5/32.png) [@snigdha](https://discuss.elastic.co/u/snigdha)\
**Post date:** [May 6, 2017, 2:23pm UTC](https://discuss.elastic.co/t/where-to-set-destructive-requires-name/84821/3 "2017-05-06T14:23:26Z")

</div>

Thanks Thiago! Do I need to recreate indices, in order to apply this setting?

---

<div class="post-metadata">

**Author:** ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)\
**Post date:** [May 6, 2017, 2:26pm UTC](https://discuss.elastic.co/t/where-to-set-destructive-requires-name/84821/4 "2017-05-06T14:26:00Z")

</div>

No. This setting is not bound to any index, it works at cluster level. It tells Elasticsearch to only accept explicit names when deleting indices.

---

<div class="post-metadata">

**Author:** ![snigdha](https://avatars.discourse-cdn.com/v4/letter/s/c6cbf5/32.png) [@snigdha](https://discuss.elastic.co/u/snigdha)\
**Post date:** [May 6, 2017, 2:26pm UTC](https://discuss.elastic.co/t/where-to-set-destructive-requires-name/84821/5 "2017-05-06T14:26:28Z")

</div>

Cool. Thank you!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 3, 2017, 2:34pm UTC](https://discuss.elastic.co/t/where-to-set-destructive-requires-name/84821/6 "2017-06-03T14:34:06Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
