I have a field called alarm_images where I store a list of objects with three fields download_date,
index and url. I wanted to lighten my mapping since I was using lot of memory for lot of fields and I wanted to disable doc_values and index for all values since I only have to retrieve the list with the rest of the document every once in a while. My problem is that I have to check if alarm_images object exists and using a mapping like the following I always get that alarm_images does not exist while it does.
I am new to ingest node, I've only used it with the basic pipeline plugins. How can I add a field based on a condition?
I tried using script pipeline but I got stuck adding the new field to the document.
Should I use another pipeline?
I solved my issue!
It was not the typo you suggested.
With the first one
ctx._source?.image != null
I get always false in the condition while with the second
ctx._source.image != null
I get a NullPointerException,
This is the solution I came with, actually I don't know why it works since I though I had to add _source after ctx. Thank you for your quick responsiveness. Have a nice day.
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.