# Always fields is String type

**URL:** https://discuss.elastic.co/t/always-fields-is-string-type/74236
**Category:** Kibana
**Created:** [February 7, 2017, 3:10pm UTC](https://discuss.elastic.co/t/always-fields-is-string-type/74236 "2017-02-07T15:10:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Beuhlet\_Reseau](https://avatars.discourse-cdn.com/v4/letter/b/e95f7d/32.png) [@Beuhlet\_Reseau](https://discuss.elastic.co/u/Beuhlet_Reseau)
#### Post date: [February 7, 2017, 3:10pm UTC](https://discuss.elastic.co/t/always-fields-is-string-type/74236/1 "2017-02-07T15:10:43Z")

</div>

Hello,

I have discover a problem with the help of community.

I noticed when i create new field in logstash conf fields is always detected to a string field. Take a **volume,voltest,vol, fields than example**

For example :

```
match => { "message" => "%{DATA:date}[;]%{DATA:nom_compteur}[;]%{DATA:zone}[;]%{NUMBER:volume}" }

```

or

```
match => { "message" => "%{DATA:date}[;]%{DATA:nom_compteur}[;]%{DATA:zone}[;]%{INT:voltest}" }

```

or

```
match => { "message" => "%{DATA:date}[;]%{DATA:nom_compteur}[;]%{DATA:zone}[;]%{NUMBER:vol}" }

mutate {
   convert => { "vol" => "integer" }
   }

```

Now, go see the field configuration in Kibana :

![](https://us1.discourse-cdn.com/elastic/original/2X/7/706150d24c846f355d7af8a6b332296264f9c2c5.JPG)

Why ?

---

<div class="post-metadata">

### Author: ![ppisljar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppisljar/32/11588_2.png) [@ppisljar](https://discuss.elastic.co/u/ppisljar)
#### Post date: [February 8, 2017, 9:57am UTC](https://discuss.elastic.co/t/always-fields-is-string-type/74236/2 "2017-02-08T09:57:17Z")

</div>

once you index your first item elasticsearch will create a mapping. this mapping won't change later even if you index diff kind of data, so if your first indexed record was bad ... then its all bad.

`http://localhost:9200/yourindex/_mapping/yourtype` sould show you your current mappings ....

sometimes if you are just playing around its easiest to just delete the index and start again ... or you could play with mapping api.

[https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html)

---

<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: [March 8, 2017, 9:57am UTC](https://discuss.elastic.co/t/always-fields-is-string-type/74236/3 "2017-03-08T09:57:28Z")

</div>

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