Did you look at the docs here you have bad syntax Note the outer double quotes and the inner single quotes. Also you need to use the context ctx You should also read about null type safety and conditionals here
There's an excellent example, much like yours.
PUT _ingest/pipeline/my-pipeline
{
"processors": [
{
"drop": {
"description": "Drop documents with 'network.name' of 'Guest'",
"if": "ctx?.network?.name == 'Guest'"
}
}
]
}
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.