I'd like to add to such documents a further NON nested field (i.e. sibling of field1, field2, field3) which is the sum of the nestedfield2s (e.g. total_nestedfield2: float).
Docs are ingested from a third party platform so I cannot modify the way they are generated but only manipulate them at load time.
Anyway, I've used ingest pipelines with _update_by_query in the past to modify some historical data but as far as I know they cannot access nested fields (in fact I had to use Logstash with a ruby script to fulfill the task eventually).
I suspect you would need to use a script process or with Painless in the pipeline. Otherwise you may need to find a way to get the data through Logstash, e.g. by using a http input and bulk codec.
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.