# Update mapping index parameter of existing field

**URL:** <https://discuss.elastic.co/t/update-mapping-index-parameter-of-existing-field/243749>\
**Category:** Elasticsearch\
**Created:** [August 4, 2020, 4:00pm UTC](https://discuss.elastic.co/t/update-mapping-index-parameter-of-existing-field/243749 "2020-08-04T16:00:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gitterhh](https://avatars.discourse-cdn.com/v4/letter/g/b19c9b/32.png) [@gitterhh](https://discuss.elastic.co/u/gitterhh)\
**Post date:** [August 4, 2020, 4:00pm UTC](https://discuss.elastic.co/t/update-mapping-index-parameter-of-existing-field/243749/1 "2020-08-04T16:00:38Z")

</div>

I have the mapping

```auto
{
  "test" : {
    "mappings" : {
      "properties" : {
        "description" : {
          "type" : "text"
        },
        "location" : {
          "type" : "keyword",
          "index" : false
        },
        "title" : {
          "type" : "text"
        }
      }
    }
  }
}

```

and I want to update the `index` parameter of the `location` field to `true`

I am trying

```auto
PUT /test/_mapping
{
  
    "properties": {
        "location": { 
            "type": "keyword",
            "index": true
        }
    }
  
}

```

and I am getting

```auto
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Mapper for [location] conflicts with existing mapping:\n[mapper [location] has different [index] values]"}],"type":"illegal_argument_exception","reason":"Mapper for [location] conflicts with existing mapping:\n[mapper [location] has different [index] values]"},"status":400}

```

How to update the `index` parameter?

---

<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:** [September 1, 2020, 4:00pm UTC](https://discuss.elastic.co/t/update-mapping-index-parameter-of-existing-field/243749/2 "2020-09-01T16:00:56Z")

</div>

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