Field 'year' automapped to long ("2019" --> "2,019")
How to convert, script, alias, painless, whatever into a field that acts as a proper year?
I tried a scripted field with:
new SimpleDateFormat('yyyy-MM-dd').parse(doc['year'].value + "-01-01").getTime();
It seems to work -- any better ideas than doing this?