# Nest C# Remove Setting from Index

**URL:** <https://discuss.elastic.co/t/nest-c-remove-setting-from-index/123315>\
**Category:** Elasticsearch\
**Created:** [March 9, 2018, 6:04pm UTC](https://discuss.elastic.co/t/nest-c-remove-setting-from-index/123315 "2018-03-09T18:04:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kim-Kruse-Hansen](https://avatars.discourse-cdn.com/v4/letter/k/f1d935/32.png) [@Kim-Kruse-Hansen](https://discuss.elastic.co/u/Kim-Kruse-Hansen)\
**Post date:** [March 9, 2018, 6:04pm UTC](https://discuss.elastic.co/t/nest-c-remove-setting-from-index/123315/1 "2018-03-09T18:04:07Z")

</div>

Hi

I have this C# code to add a setting to an index:

```
                var req = new UpdateIndexSettingsRequest();
                req.FlatSettings = true;
                req.FilterPath = new[] { index };
                req.IndexSettings = new IndexSettings();

                 req.IndexSettings.Add("index.routing.allocation.require.box_type", boxtype);

                var rspUpdate = c.UpdateIndexSettings(req);

```

But how do I remove this setting again? I cant use "" or null .

Regards  
Kim

---

<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:** [April 6, 2018, 6:04pm UTC](https://discuss.elastic.co/t/nest-c-remove-setting-from-index/123315/2 "2018-04-06T18:04:36Z")

</div>

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