I have a Field called Description and using mutate i want add a new field called category
Description has certain words like cat, dog
If cat keyword comes then assign value Cat and with dog keyword with Category value as Dog
if no cat and dog keyword value then None
Like in below table
I have tried this filter with mutate and grok
But i am not able to define right if else condition
if "cat" in [Description] or "kitten" in [Description]
Note that this is comparison is case-sensitive. You'll either have to switch to a case-insensitive regexp match or lowercase the contents of the field where you're looking for the pets.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.