Group by with Lucene queries (ElasticSearch)

Hello. I was wondering if I can do a group by in Lucene (I’m currently using a ElasticSearch datasource). This my dashboard, filtered by one of my elements:

The problem here is that when I filter by id, the table below filters the data by the id, but the id is repeated several times, so i want to do a group by id.
As I’m using grafana logs to display all the info of ElasticSearch, I can’t do a group by, or I dont know how to do it:
dsdasdasdasdasd

Can you help me? Thanks!

Hello, its me again. Investigating from a GitHub user I saw that transformations can work above Lucene queries, as Lucene does not have aggregations implemented on its base language.

You can do it here:
dsdasdasdasdasd