If I have implemented this last_doc scripted metric aggregation in a transform example, how could I access fields within the returned doc (let's imagine there is a field "price" in the last_doc), in bucket script metric in the same transform, for instance,
Yes the latest transform is a helpful tool, for sure.
But do you know it you can add additional metrics like bucket scripts to do further calculations against the latest doc?
And also, I use the scripted metrics to pull >1 indexes data into a single transform destination doc... Do you know if you can do that with the latest transform, i.e. have the transform combine the docs from >1 index in the transform output? That would definitely be helpful to me.
But do you know it you can add additional metrics like bucket scripts to do further calculations against the latest doc?
Not directly within transform config, but maybe you could implement ingest pipeline that does it and attach it to the destination index using [dest.pipeline](https://But do you know it you can add additional metrics like bucket scripts to do further calculations against the latest doc?) setting?
i.e. have the transform combine the docs from >1 index in the transform output?
Yes, you can specify more than 1 source index in the transform configuration (see source.index). latest transform then "combines" them by taking the latest document (from one of the indices) with the given unique_key.
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.