Im trying to create a set condition if two fields are the same, ive not been able to find how to do this with the elastic pipeline
ctx.dns.question.name =='{{{ctx.host.hostname}}}'
Im trying to create a set condition if two fields are the same, ive not been able to find how to do this with the elastic pipeline
ctx.dns.question.name =='{{{ctx.host.hostname}}}'
Try this
POST _ingest/pipeline/_simulate
{
"docs": [
{
"_source": {
"a": "c",
"b": "c"
}
},
{
"_source": {
"a": "c",
"b": "d"
}
}
],
"pipeline": {
"processors": [
{
"script": {
"source": "if (ctx.a == ctx.b) { ctx.c = 'SAME'}"
}
}
]
}
}
Thats perfect thank you, i dont know why i felt as though it should be different to fieldA == fieldB
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.