Hello
Following this example
When using doc['timestamp'].value.getMonth();
Getting an error
[Possible causing node crash, still monitoring]
doc['timestamp'].value.getMonthValue();
works as expected and returning month number.
What is the way to get month names? Without using SWITCH / CASE
I tried some other functions like getMonths()
if(!doc.containsKey('timestamp') || doc['timestamp'].empty )
return 'None';
else
return doc['timestamp'].value.getMonths();
Also tried getShortMonths();
getting errors -->
"type": "illegal_argument_exception",
"reason": "dynamic method [org.elasticsearch.script.JodaCompatibleZonedDateTime, getMonths/0] not found"
Cheers!