We have a mapping issue that will be addressed soon for a field that should be an int but is presently a string. All values in the index should cast cleanly.
Anyhow, in a pinch I wanted to aggregate some data on the field and thought creating a scripted field in K5 would be a temp solution. Can anyone point me in the right direction or provide a code example? I tried several things including
(int)['doc.myfield'].value and also
parseInt(string) as documented at https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html#parseInt%2Djava.lang.String%2D.
Is type casting a String to Int supported in either of the 3 scripting languages listed in K5?