Depend how date is coming, you can set to:
- Empty string
if ![date] {
mutate { add_field => { "date" => "" } }
} - Null string
if ![date] {
mutate { add_field => { "date" => "Null" } }
} - Or null value, use ruby inside if
How to write NULL value for a field
Change null value from database for one field using logstash and insert into Elasticsearch - #8 by malhotras