# Why number is not recognized as integer

**URL:** https://discuss.elastic.co/t/why-number-is-not-recognized-as-integer/273917
**Category:** Logstash
**Created:** [May 25, 2021, 10:17am UTC](https://discuss.elastic.co/t/why-number-is-not-recognized-as-integer/273917 "2021-05-25T10:17:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dinesh5](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@dinesh5](https://discuss.elastic.co/u/dinesh5)
#### Post date: [May 25, 2021, 10:17am UTC](https://discuss.elastic.co/t/why-number-is-not-recognized-as-integer/273917/1 "2021-05-25T10:17:59Z")

</div>

Hi

Here is my sample data

Madhya Pradesh;22.9734;78.6569;57766;764338;7558  
Maharashtra;19.7515;75.7139;351005;5579897;88620  
Manipur;24.6637;93.9063;6534;44089;688

Logstash considered the text and float but it doesn't recognize the integer (last 3 values in a row)

![image](https://us1.discourse-cdn.com/elastic/original/3X/3/2/32db3c023102d517dbb18fca2fe1446b2c212557.png)

and here is my lsdp.conf

input {  
file {  
path =\> "/home/noname/Desktop/lsdp.csv"  
start\_position =\> "beginning"  
sincedb\_path =\> "/dev/null"  
}  
}  
filter {  
csv {  
separator =\> ";"  
columns =\> ["State", "latitude", "longitude", "ActiveCases", "TotalPositive", "TotalDeath"]  
}  
mutate {  
convert =\> {  
"latitude" =\> "float"  
"longitude" =\> "float"  
"Cases" =\> "integer"  
"Recovered" =\> "integer"  
"Death" =\> "integer"  
}  
}  
mutate {  
rename =\> {  
"longitude" =\> "[location][lon]"  
"latitude" =\> "[location][lat]"  
}  
}  
}  
output {  
elasticsearch {  
hosts =\> "[http://192.168.0.102:9200](http://192.168.0.102:9200)"  
index =\> "lsdp"  
}  
stdout {codec =\> rubydebug}  
}

and the index

PUT lsdp  
{  
"mappings": {  
"properties": {  
"location": {  
"type": "geo\_point"  
}  
}  
}  
}

can anyone help me out

Thanks in advance

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [May 25, 2021, 2:20pm UTC](https://discuss.elastic.co/t/why-number-is-not-recognized-as-integer/273917/2 "2021-05-25T14:20:51Z")

</div>

> [@dinesh5](#):
>
> "Cases" =\> "integer"  
> "Recovered" =\> "integer"  
> "Death" =\> "integer"

These three do not match the column names in the csv, so they have no effect.

Note that once you change them it will still not affect elasticsearch until it rolls over to a new index. Once a field in an index is a string in elasticsearch it cannot be changed.

---

<div class="post-metadata">

### Author: ![dinesh5](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@dinesh5](https://discuss.elastic.co/u/dinesh5)
#### Post date: [May 26, 2021, 12:23pm UTC](https://discuss.elastic.co/t/why-number-is-not-recognized-as-integer/273917/3 "2021-05-26T12:23:58Z")

</div>

Thanks a lot

---

<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: [June 23, 2021, 12:24pm UTC](https://discuss.elastic.co/t/why-number-is-not-recognized-as-integer/273917/4 "2021-06-23T12:24:44Z")

</div>

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