I'm a complete beginner with Kibana and its my first time creating a scripted field. I'm creating a script to retrieve the transaction id's of dropped transactions from all my transaction logs.
Below is the script which contains an error that I don't understand. It'd be great if someone could explain it to me and provide me with tips for a fix.
</>
string current = "abc";
for (def log1 : doc['invoice_id'].values {
if (log1 != current) {
log1 = current;
for (def log2 : doc['invoice_id'].values) {
if (log2 == current) {
if (doc['log_type'].values.contains("MER_REQUEST")) {
if (doc['log_type'].values.contains("MER_RESPONSE")) {
}
else {
return current;
}
}
}
}
}
}
</>