Group_concat aggragation

Hello everybody. I am new to elasticsearch and I would like to create a group_concat aggregation. But I don't know how. Can someone help me please.

The example data:

    POST /example_measures/_bulk

What i want expressed in sql:

    select datapoint_id, 
    group_concat(`datetime` order by `datetime` SEPARATOR ',' limit 5) as dt, 
    group_concat(`value` order by `datetime` SEPARATOR ',' limit 5) as val 
    from example_measures 
    group by datapoint_id;

I would like to have 2 arrays per data point. One with the timestamps and one with the values.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.