0

This doesn't work, just giving a "compile error" message in the watcher simulator.

l0b0
  • 55,365
  • 30
  • 138
  • 223

1 Answers1

0

It looks like the AWS Elasticsearch disables regexes by default. The (so far untested, but compiles) solution avoiding regexes is Duration.ofMillis(ctx.payload._source.computed.duration).toString().substring(2).replace("H", "h ").replace("M", "m ").replace("S", "s").trim().

l0b0
  • 55,365
  • 30
  • 138
  • 223