logstash-filter-translate
logstash-filter-translate copied to clipboard
Add feature to treat source as regexp
currently is possible to use :regex => true to treat dictionary keys as regexp, but would be nice to have the opposite: use contents of source as regexp that will match against exact dictionary keys
@jsvd got an example use case in mind?
the use case came from a user that had a dictionary of postal codes to locations but sometimes the data from events wasn't very precise and the idea was to match the closest.
Example
dictionary:
10LX145: Lisbon
15OP141: Porto
an event arrives with field: "pcode" => "10LX14"
There's no way to match the code 10LX14 with 10LX145
with this feature /10LX14/ would match 10LX145