# Kibana field type and Elasticsearch mapping don't match

**URL:** https://discuss.elastic.co/t/kibana-field-type-and-elasticsearch-mapping-dont-match/247528
**Category:** Kibana
**Created:** [September 4, 2020, 11:55am UTC](https://discuss.elastic.co/t/kibana-field-type-and-elasticsearch-mapping-dont-match/247528 "2020-09-04T11:55:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![egray](https://avatars.discourse-cdn.com/v4/letter/e/278dde/32.png) [@egray](https://discuss.elastic.co/u/egray)
#### Post date: [September 4, 2020, 11:55am UTC](https://discuss.elastic.co/t/kibana-field-type-and-elasticsearch-mapping-dont-match/247528/1 "2020-09-04T11:55:31Z")

</div>

I spent a long time today trying to apply a new index template, to change the type of a field from a string to an integer. Then I used the GET Mapping API and saw this :

```auto
"response_time" : {
    "type" : "integer"
    },

```

I suspect there was no problem with Elasticsearch or Logstash in the first place, but for some reason Kibana still treats it as a string. I deleted all my old indices and index templates (the data wasn't important). I've changed other fields using a custom mapping and Kibana hasn't done this before. What could be causing this?

---

<div class="post-metadata">

### Author: ![mikecote](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mikecote/32/58549_2.png) [@mikecote](https://discuss.elastic.co/u/mikecote)
#### Post date: [September 4, 2020, 12:59pm UTC](https://discuss.elastic.co/t/kibana-field-type-and-elasticsearch-mapping-dont-match/247528/2 "2020-09-04T12:59:07Z")

</div>

Hi @egray,

I want to confirm that you've refreshed the field list in Kibana for the index pattern?

The refresh button is located at the top right when viewing an index pattern in Kibana management.

 ![Screen Shot 2020-09-04 at 8.57.24 AM](https://us1.discourse-cdn.com/elastic/original/3X/7/f/7f275b1151fadd22c17c8d6f72d3dbf3e300827a.png)

---

<div class="post-metadata">

### Author: ![egray](https://avatars.discourse-cdn.com/v4/letter/e/278dde/32.png) [@egray](https://discuss.elastic.co/u/egray)
#### Post date: [September 4, 2020, 1:12pm UTC](https://discuss.elastic.co/t/kibana-field-type-and-elasticsearch-mapping-dont-match/247528/3 "2020-09-04T13:12:46Z")

</div>

Thank you, this fixed it, although I had to create a new index pattern because there were no index patterns. I don't know why any logs were showing up at all, or why previously I haven't had to do this.

---

<div class="post-metadata">

### Author: ![mikecote](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mikecote/32/58549_2.png) [@mikecote](https://discuss.elastic.co/u/mikecote)
#### Post date: [September 4, 2020, 1:15pm UTC](https://discuss.elastic.co/t/kibana-field-type-and-elasticsearch-mapping-dont-match/247528/4 "2020-09-04T13:15:13Z")

</div>

I'm guessing there could have been a mismatch on types between indices of that index pattern causing the string type to be what Kibana used.

---

<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: [October 2, 2020, 1:15pm UTC](https://discuss.elastic.co/t/kibana-field-type-and-elasticsearch-mapping-dont-match/247528/5 "2020-10-02T13:15:15Z")

</div>

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