The problem is that I have to calculate the average of the ACTUAL_CONSUMPTION field of the logs that have the same value in the field "Datapoint" and not of the rest.
so you want to group by the value of the DataPoint field and then calculate the avg of the ACTUAL_CONSUMPTION field?
If you, you should check out aggregations, if you need to this for more than one value of the DataPoint field. You could use a terms aggregation and inside of that a avg agg.
If you only need the avg value of a single value of DataPoint then a filter query for that value and an avg aggregation are sufficient.
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.