How to write a script in Ingest Pipeline to detect the null values and pushed to separate index on failure (unformattedindex)

How to detect the null values in Ingest Pipeline and Index it.
Actual index name: myindex
Unformatted index name: unformattedindex

i have tried the below Script Processor to detect the null values to Actual index(indexmyindex) on failure pushed to (unformattedindex), But it was not working.
I don't see the document for null values for Ingest Pipeline.
"script" : {
"lang" : "painless",
"source" : "ctx._source.field != null",
"on_failure" :
"set" : {
"field" : "_index",
"value" : "unformattedindex"

hi @sravankayitha , this might be more of a question on the Elasticsearch side of things. I'll move the topic there.

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