Multiple conditions on compare

how can we write multiple compare condition in xpack?

"condition" : {
    "compare" : {
      "ctx.payload.status" : { "eq" : "red" }
    }
  }

I want to have two conditions, one for eq:red and eq:green,
either one should satisfy the condition.
Thanks

use painless and a script condition and just combine your conditions with &&

"script" : "return ctx.payload.status == 'red' && ctx.payload.foo == 'bar'"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.