# Convert String to float failed

**URL:** https://discuss.elastic.co/t/convert-string-to-float-failed/32232
**Category:** Logstash
**Created:** [October 15, 2015, 3:23am UTC](https://discuss.elastic.co/t/convert-string-to-float-failed/32232 "2015-10-15T03:23:47Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [October 15, 2015, 6:10am UTC](https://discuss.elastic.co/t/convert-string-to-float-failed/32232/3 "2015-10-15T06:10:35Z")

</div>

> ```
> mutate {
> 
> ```

```
  add_field => {"geoip.location" => ["%{longitude}","%{latitude}"]}
  convert => { "geoip.location" => "float" }
}

```

I'm not sure if these directives are necessarily processed in order. I'd try splitting this in two mutate filters (one with `add_field` and one with `convert`) just to make sure the field is added before we attempt to convert its type.

---

_[View the full topic](https://discuss.elastic.co/t/convert-string-to-float-failed/32232)._
