If your target is Elasticsearch, you'll have to use a mapping. Logstash is really only able to understand
string. These changes are used internally in Logstash to allow for mathematical operations on numbers, when they were originally seen as strings.
float field types can send properly typed values via JSON, since that is what Elasticsearch requires. Otherwise, Elasticsearch mappings would be needed to convert "10" to
10. Elasticsearch also uses mappings (and mapping templates), to convert "192.168.0.10" to an IP-type field. These mappings are also highly recommended as there are more numeric types besides
float. Choosing the correct java primitive type can save a lot of storage space (
long, for example).
So, long story short, see the default mapping template provided by Logstash for insight into mapping an IP type.