# Setting index.mapper.dynamic was removed after version 6.0.0

**URL:** <https://discuss.elastic.co/t/setting-index-mapper-dynamic-was-removed-after-version-6-0-0/305866>\
**Category:** 中文提问与讨论\
**Created:** [May 29, 2022, 1:17am UTC](https://discuss.elastic.co/t/setting-index-mapper-dynamic-was-removed-after-version-6-0-0/305866 "2022-05-29T01:17:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhupengfeivip](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zhupengfeivip/32/106297_2.png) [@zhupengfeivip](https://discuss.elastic.co/u/zhupengfeivip)\
**Post date:** [May 29, 2022, 1:17am UTC](https://discuss.elastic.co/t/setting-index-mapper-dynamic-was-removed-after-version-6-0-0/305866/1 "2022-05-29T01:17:16Z")

</div>

昨天需要在生产环境发布一下，加了一个字段。发现居然报错，错误如下

```auto
root@walrus:/data/a8service/source# curl -X PUT "http://ca.yorkbbs.elasticsearch:9200/metaobject/_mapping?pretty" -H 'Content-Type: application/json' -d'
> {
> "properties": {
> "property_inWeChat": {
> "type": "long"
> }
> }
> }
> '
{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "Setting index.mapper.dynamic was removed after version 6.0.0"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "Setting index.mapper.dynamic was removed after version 6.0.0"
  },
  "status" : 400
}

```

背景说明一下，  
ES版本7.1.4，有测试环境和生产环境  
以上脚本在测试环境执行过，且是成功的。  
只是在ES里加了一个字段，并不是修改dynamic，网上搜索到的，和这个都不一样。  
很奇怪。

---

<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 26, 2022, 1:18am UTC](https://discuss.elastic.co/t/setting-index-mapper-dynamic-was-removed-after-version-6-0-0/305866/2 "2022-06-26T01:18:13Z")

</div>

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