I am fetching timestamp and data against that timestamp with my search query to Elasticsearch node. The result being fetched contains multiple values against the same timeframe and I want Elasticsearch to return the aggregated value instead of single values.
For instance, the returned data array looks similar to following: Time: ['2020-10-04 12:28','2020-10-04 12:28','2020-10-04 12:28','2020-10-04 12:29','2020-10-04 12:29'....] Vals: [10,10,10,10,10]
I want it to aggregate Vals with respect to Time and the result should look like following: Time: ['2020-10-04 12:28','2020-10-04 12:29',....] Vals: [30,20]
Please provide a fully reproducible example. This question is impossible to answer without a lot of guesswork, because we are missing the document structure. So please provide an example including index creation/mapping, sample documents and the query, this would help a lot!
@spinscale Complete response of the above mentioned query can be found here. It can be seen that the PPMs are aggregated at the end but that aggregation is applied on all the fetched records. I want this aggregation applied on the results for which Timestamp is same.
Kindly let me know if there is still something which I should explain.
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.