Hi triest,
maybe I misunderstand your question, but how about a case() instead of searchmatch() ?
Since searchmatch() takes a regex as argument you will compare against a literal filter in your example.
Your example works btw if you do it like this:
| eval actual=if(searchmatch("filter"),1,0)
but this will match all events since you have filter in all example events.
Would a case() like this do the thing?
| eval actual=case(expected="1", "Yes", expected="0", "No", 1=1, "unknown")
Again I may understand the requirement completely wrong ¯\_(ツ)_/¯ 😉
cheers, MuS
... View more