Panel Static Year date range in Grafana with Elastic Search data source

I hope someone can help with the following inquiry
using Grafana v9.5.5
using ElasticSearch as my data source
I wish to set up separate panels (one for 2020, 2021, 2022, 2023, 2024) with a static year time range (ie 2023-01-01 00:00:00 to 2023-12-31 11:59:59) in Grafana

Can someone help to info on how I can accomplish this as I have not been able to find a solution thus far ?

welcome to forum @eoharris

How would you bucketize this es data if you had to run the Lucene query outside of grafana?

Hi @yosiasz it would be the following:

GET index-name/_search
{
  "query": {
    "range": {
      "timestamp": {
        "gte": "2023-01-01T00:00:00",
        "lt": "2024-01-01T00:00:00"
      }
    }
  }
}

Thanks @davidtang if you had to run that query in elastic search, would that bucketize the data per @eoharris requirement?