I'm trying to convert a text type field into a float one in Logstash and ElasticSearch mapping.
field name: votingPercentage.
My log looks as follow: "votingPercentage = 0.13]"
Since there's a "]" sign in the end of the field's value - the ElasticSearch cannot map it into float.
In order to delete the "]" sign, I've tried to do the following configuration in logstash.conf file:
gsub => [
"votingPercentage", "g]", " "
(using g as global)
This configuration has dropped the "]" sign and enabled the votingPercentage field to be mapped as float, but it has also dropped any appearance of the "g" letter in the field, so the result is: "votin Percenta e" is now the field name.
Can you please assist me?