Aggregations : count aggregate based on field with multiple date ranges

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):

Open Search 2.0

Describe the issue:

We do have a requirement to display the bar chart based by fields(count based on index document) along with multiple data ranges like current Year, Date Range and Previous Year.

Please suggest the best example to achieve the above scenario using search aggregations.
Thanks in advance.

Configuration:

NA

Relevant Logs or Screenshots:

NA