Ah-ha, I understand. Depending on exactly what you're trying to acheive. If you truly are looking to use TERM in the conventional sense to group the message.payload properties, then you can let Splunk natively take care of the different TERMs via a subsearch: index="example" TERM(STOP)
| eval message1 = src_ip
| table _time, message1
| append
[| search index="example" TERM(index)
| eval message2 = src_ip
| table _time, message2
]
| stats values(message1) as message1, values(message2) as message2, count by _time If you know that your TERMs will always have a consistent prefix/suffix, e.g. always surrounded by a space, then you could use the LIKE command as follows: index="example" (TERM(STOP) OR TERM(index))
| eval message1=if(LIKE(_raw,% STOP %), message.payload, null())
| eval message1=if(LIKE(_raw,% index %), message.payload, null())
| stats values(message1) as message1, values(message2) as message2, count by _time
... View more