I am looking to perform a case match search and have found that this query template attempted to answer how to define a case statement with an or condition on two matches. However, when I have used it within my own search I have found that even though the search executes correctly, the table returns with the "k12" row missing, even though "k1", "k2", and "k3" appear. Anyone know of a right way to perform a case match statement with an or condition, or is there a better method I should be following instead?
index=abc sourcetype=xyz
| eval w=case( match(_raw,"keyword1"), "k1",
match(_raw,"keyword2"), "k2",
match(_raw,"keyword3"), "k3",
match(_raw,"keyword1") OR match(_raw,"keyword2"), "k12")
| chart count by w
... View more