# Mapping Value is not changing after updating

**URL:** https://discuss.elastic.co/t/mapping-value-is-not-changing-after-updating/241437
**Category:** Elasticsearch
**Created:** [July 16, 2020, 10:52am UTC](https://discuss.elastic.co/t/mapping-value-is-not-changing-after-updating/241437 "2020-07-16T10:52:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Aniket\_Pant](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Aniket\_Pant](https://discuss.elastic.co/u/Aniket_Pant)
#### Post date: [July 16, 2020, 10:52am UTC](https://discuss.elastic.co/t/mapping-value-is-not-changing-after-updating/241437/1 "2020-07-16T10:52:53Z")

</div>

"mappings": {  
"properties": {  
"client.ip":{"type": "ip"},  
"host.ip":{"type": "ip"},  
"server.ip":{"type": "ip"},  
"source.ip":{"type": "ip"},  
"destination.ip":{"type": "ip"},  
"geoip":  
{  
"dynamic": true,  
"properties": {  
"ip":{"type":"ip"},  
"latitude":{"type":"half\_float"},  
"longitude":{"type":"half\_float"},  
"location":{"type":"geo\_point"}  
}

```
  }

```

This was the first mapping i created and the result i got successfull that is geo.ip type was ip and geo.latitude type was half float.  
After that i want to add some fields so i update my mapping  
"mappings": {  
"properties": {  
"client.ip":{"type": "ip"},  
"host.ip":{"type": "ip"},  
"server.ip":{"type": "ip"},  
"source.ip":{"type": "ip"},  
"destination.ip":{"type": "ip"},  
"geoip":  
{  
"dynamic": true,  
"properties": {  
"ip":{"type":"ip"},  
"latitude":{"type":"half\_float"},  
"longitude":{"type":"half\_float"},  
"location":{"type":"geo\_point"}  
}

```
  },
  "destination.geo":
  {
    "dynamic":false,
    "properties": {
      "ip":{"type":"ip"},
      "latitude":{"type":"half_float"},
      "longitude":{"type":"half_float"},
      "location":{"type":"geo_point"}
      
    }
  }

```

when i run this query("acknowledged" : true) and refresh my index pattern there is no change in its type earlier destination.geo.ip type was string after updating it type was same i m not talking about only one field.

---

<div class="post-metadata">

### Author: ![Vinayak\_Sapre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinayak_sapre/32/45939_2.png) [@Vinayak\_Sapre](https://discuss.elastic.co/u/Vinayak_Sapre)
#### Post date: [July 17, 2020, 4:45am UTC](https://discuss.elastic.co/t/mapping-value-is-not-changing-after-updating/241437/2 "2020-07-17T04:45:05Z")

</div>

> [@Aniket\_Pant](#):
>
> when i run this query("acknowledged" : true) and refresh my index pattern there is no change in its type earlier destination.geo.ip type was string after updating it type was same i m not talking about only one field.

If index already has a "destination.geo.ip" field of type "text" because you ingested doc with that field name before defining the field, index mapping change should fail as "type" change is not allowed.

You are not changing it in the index template right?

---

<div class="post-metadata">

### Author: ![Aniket\_Pant](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Aniket\_Pant](https://discuss.elastic.co/u/Aniket_Pant)
#### Post date: [July 17, 2020, 5:35am UTC](https://discuss.elastic.co/t/mapping-value-is-not-changing-after-updating/241437/3 "2020-07-17T05:35:39Z")

</div>

when i delete my index and recreated then i got destination.geo.ip type ip

---

<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 14, 2020, 5:35am UTC](https://discuss.elastic.co/t/mapping-value-is-not-changing-after-updating/241437/4 "2020-08-14T05:35:44Z")

</div>

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