# Mapper field type being changed by something

**URL:** <https://discuss.elastic.co/t/mapper-field-type-being-changed-by-something/41452>\
**Category:** Logstash\
**Created:** [February 11, 2016, 4:50am UTC](https://discuss.elastic.co/t/mapper-field-type-being-changed-by-something/41452 "2016-02-11T04:50:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wolls013](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@Wolls013](https://discuss.elastic.co/u/Wolls013)\
**Post date:** [February 11, 2016, 4:50am UTC](https://discuss.elastic.co/t/mapper-field-type-being-changed-by-something/41452/1 "2016-02-11T04:50:26Z")

</div>

Hi Everyone,

I'm pretty new to new to ELK and i've made a mapper "location" which is a geo\_point type so I can pass my lat and long data to it.

This is how I've mapped it

```
`PUT my_index
{
  "mappings": {
    "location": {
      "properties": {
        "location": {
          "type": "geo_point"
        }
      }
    }
  }
}`

```

It seems to be taking inputs correctly but I get this weird error(with picture of error message below)

"reason=\>{"create"=\>{"index"=\>"logstash-2016.02.10v8", "type"=\>"logs", "\_\_id"=\>"AVLOr7VExrrwFF6j5zLP", "status"=\>400, "error"=\>{"type"=\>"illegal\_argument\_exception", "reason"=\>"mapper [location] cannot be changed from type [geo\_point] to [long]"}}}, :level=\>:warn}

 ![](https://us1.discourse-cdn.com/elastic/original/2X/a/ad47ced10c8729e9c4307dd1a06f9a1314de0d79.png)

It seems like something is trying to change location's type and I have nothing in my configuration file that does that. I'm curious how I can stop this from happening/identify what is attempting to change "mapper [location]"

here is my confg

```
`filter {
  mutate {
      convert => { "lat" => "float" }
      convert => { "lon" => "float" }
      add_field => { "location" => "%{lat}" }
      add_field => { "location" => "%{lon}" }
      }

  geoip {
    source => "geoip.ip"
    add_field => { "geoip_location" => "%{lat}" }
    add_field => { "geoip_location" => "%{lon}" }
  }

   grok {
     # match => { "imei" => "%{GREEDYDATA:imei_num}" }
	   match => { "__createdAt" => "%{GREEDYDATA:event_data}" }
     }
}
`

```

Thanks for any help!!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 11, 2016, 5:03am UTC](https://discuss.elastic.co/t/mapper-field-type-being-changed-by-something/41452/2 "2016-02-11T05:03:33Z")

</div>

Please don't post images of text, that is really hard to read, and some people may not even be able to see it at all.

---

<div class="post-metadata">

**Author:** ![Wolls013](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@Wolls013](https://discuss.elastic.co/u/Wolls013)\
**Post date:** [February 11, 2016, 5:11am UTC](https://discuss.elastic.co/t/mapper-field-type-being-changed-by-something/41452/3 "2016-02-11T05:11:27Z")

</div>

i've added text of the error. I would still appreciate help for fixing this error.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 11, 2016, 5:12am UTC](https://discuss.elastic.co/t/mapper-field-type-being-changed-by-something/41452/4 "2016-02-11T05:12:12Z")

</div>

Right, well you cannot change the mapping of a field once it is set. So you need to delete the index, put the mapping, then reindex.

---

<div class="post-metadata">

**Author:** ![Wolls013](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@Wolls013](https://discuss.elastic.co/u/Wolls013)\
**Post date:** [February 11, 2016, 5:19am UTC](https://discuss.elastic.co/t/mapper-field-type-being-changed-by-something/41452/5 "2016-02-11T05:19:31Z")

</div>

I deleted the index, and made the same mapping and created a new index. I get the same error as before, i'm not trying to change the mapping of this field at all something else is attempting to change it.

---

<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:** [July 6, 2017, 5:12am UTC](https://discuss.elastic.co/t/mapper-field-type-being-changed-by-something/41452/6 "2017-07-06T05:12:08Z")

</div>


