Hi!
I am trying to add field in to a type by using if statement. But logstash report error
[LogStash::Runner] ERROR logstash.agent - fetched an invalid config
Here is my filter part
filter {
if [type]=product{
mutate {
add_field => { "product_suggest" => "%{display_name}" }
add_field => { "product_suggester" => "%{display_name}" }
remove_field => ["attribute_value_en ", "attribute_value_sc "]
}
}
if [type]=merchant{
mutate {
add_field => { "merchant_suggest" => "%{merchant_name}" }
add_field => { "merchant_suggester" => "%{merchant_name}" }
}
}
}
Does any one get some idea where I worry? or any method that can add field by type?