Hi, im trying to parse a field only if its a number, from time to time I get the string "n/a" instead of a number so I write this conditional inside a filter, but doesnt work.
I also have another mutate { convert => {}} inside the same filter, I dont know if this could be a problem
if [physmemperc] != "n/a"{ mutate { convert => {"physmemperc" => "float" }}}
mutate {
convert => {
"virtmemperc" => "float"
"pages" => "float"
"id" => "integer"
}
The error
error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse field [physmemperc] of type [float] in document with id 'B4bfpXAB4khdA4bte5Fb'. Preview of field's value: 'n/a'", "caused_by"=>{"type"=>"number_format_exception", "reason"=>"For input string: \"n/a\""}}}}}