Replacing timestamp field null value with constant date value through ingest pipeline

We want to know the possibilities of replaing a null valued field with connstant value suplied in ingest pipeline.

We are pushing data to elasticsearch where we have field salesdate in all docs and it may be null in few cases, instead of salesdate as null we want it to be replaced by some constant date like 2020-01-01 00:00.00.

How to acheive this, kindly help us.

This is possible. You can use a set processor in the pipeline, with an if check to make sure the field doesn't exist. i.e. !ctx.containsKey('myField').

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