I wanted to know if there is any support for using scripted_metric aggregations in Kibana ? I wrote an elasticsearch query which uses scripted_metric, but I want to use it in visualizations. I am using Kibana/ElasticSearch versions 5.1.1.. You help will be really grateful.
Thanks for replying. I am trying to find out the time spent on a test based on started and ended object.id (assuming for any student for a particular test, there are only two events : start and end)
Below is the scripted metric aggregation query.
Unfortunately there isn't any way to accomplish this in Kibana. There's an open issue you can add your feedback to and follow for notifications here: https://github.com/elastic/kibana/issues/7879
Is there a way to post these aggregated results to a new index in elasticsearch?
Probably I can create some visuals using new index fields. Just a thought.
Hmm, I don't know of anything to allow you to do that. There is a reindex API that allows using scripts, but from my understanding, the scripts execute on the document level, not on aggregations.
That being said, there's nothing preventing you from taking the results of the aggregation and manually indexing them into a new index.
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.