How to write trigger condition


I am writing trigger condition for user created and deleted within 10 mn. Below is condition , but it is giving
compile error

{“script”:{ “lang”: “painless”,
“source”: “def -> p.key).collect(Collectors.toList()); return -> p.key).filter(p -> removes.contains§).toArray().length > 0;”


Hi Yogesh,

Please refer to:
The monitor query response should be accessed using ctx.results[0] instead of ctx.payload