In Elasticsearch SQL using group by year(date-field) is slow, should I create a standalone year-of-date field when importing?

Hi all, the "year" function in group by is slow.
Here is the example:

"select year(docdate), sum(docamt) FROM indexA GROUP BY year(docdate)"
is much slower than
"select docdate_year, sum(docamt) FROM indexA GROUP BY docdate_year"

Should I create another "year field", "month field", "day field" for speed?
Are there any other approach to speed the date-function in the group by clause?

Creating separate fields for year, month, day will definitely be faster than the YEAR SQL function.