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
&&
"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.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.