Replace Field Values - Type Conversion

(coder lol) #1

Considering this event:


[source][line] is an integer
[contextMap][sourceline] is a string

Given this mutate filter:
mutate {
replace => { "[source][line]" => "%{[contextMap][sourceline]}" }

Would the [contextMap][sourceline] value be converted to an integer automatically?


(Magnus B├Ąck) #2

No. A field doesn't have a data type of its own. If you assign a string value to a field then it'll be a string after the assignment too. Same with integers.

(system) #3