I'm trying to create a run-time field which creates an array. I've been doing simple things like creating strings based on a conditional field but I can't seem to get the right syntax for a multi-value string object. This is currently what I'm looking to do....
(this is done within Kibana)
if (doc['criteria.keyword'].value == 'condition') emit('result1','result2');
"test": [ "result1", "result2" ]
The emit I've used below fires a syntax error about having more than one condition.
Thanks for the assistance.