Now I would like to get daily average, just one number.
In fact what I am looking for is sumTotalPrice / amount of days
What is the most elegant way to do this?
My first thought was to get (somehow) amount of days based on range filter and use it in scripted field. Like "gt": "now-30d" is 30 days and "gt": "now-1m" is amount of days depends of the month. I would like to ask if this is possible.. (as I failed to do this) And then do my calculations sumTotalPrice / amount_of_days.
Is it possible or is there a better, simple and elegant way?
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.