The terms API supported only strings. Numbers and dates were basically not
supported with the only workaround is the use a multi field mapper, with a
string type for them as well as number. But, even that is not good enough,
since they are treated as text, so, for example, the from/to are not that
meaningful (1, 11, 2, ...).
Now, the terms API fully supports numbers and dates, both when using
from/to, and returning the actual values. See here:
As a side note, the terms API is one of my favorite APIs. You can easily
show tag clouds, breakdown of "heat map" of different documents in the
index, for example, based on specific date or something similar.