# How to update elastic search \_source settings?

**URL:** <https://discuss.elastic.co/t/how-to-update-elastic-search-source-settings/278431>\
**Category:** Elasticsearch\
**Created:** [July 12, 2021, 1:29pm UTC](https://discuss.elastic.co/t/how-to-update-elastic-search-source-settings/278431 "2021-07-12T13:29:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarvinLiu](https://avatars.discourse-cdn.com/v4/letter/m/ccd318/32.png) [@MarvinLiu](https://discuss.elastic.co/u/MarvinLiu)\
**Post date:** [July 12, 2021, 1:29pm UTC](https://discuss.elastic.co/t/how-to-update-elastic-search-source-settings/278431/1 "2021-07-12T13:29:28Z")

</div>

When I try to update the \_source parameter in elastic search,I got an error. Can I change this settings?

```auto
PUT source-test
POST source-test/_mappings
{
  "_source" : {
      "enabled":true
  }
}
POST source-test/_mappings
{
  "_source" : {
      "enabled":false
  }
}

```

* * *

```auto
{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "Mapper for [_source] conflicts with existing mapper:\n\tCannot update parameter [enabled] from [true] to [false]"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "Mapper for [_source] conflicts with existing mapper:\n\tCannot update parameter [enabled] from [true] to [false]"
  },
  "status" : 400
}

```

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [July 12, 2021, 1:45pm UTC](https://discuss.elastic.co/t/how-to-update-elastic-search-source-settings/278431/2 "2021-07-12T13:45:01Z")

</div>

You need to set that enabled field when creating an index. You cannot change that setting at runtime.

See [\_source field | Elasticsearch Guide [7.13] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/mapping-source-field.html)

---

<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:** [August 9, 2021, 1:45pm UTC](https://discuss.elastic.co/t/how-to-update-elastic-search-source-settings/278431/3 "2021-08-09T13:45:37Z")

</div>

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