String.split is not available because it compiles a regex. In Painless, regexes are a feature that can be disabled, and also statically compiled (thus the special syntax using the "slashy string" to get a Pattern object above.
I have enable regex pattern in elasticsearch.yml.
I'm trying to use regex syntax as mention below:
String[] parts = /_/.split(doc['RequestInTime.keyword'].value);
List value = Arrays.asList(parts);
String val = value[1];
return val;
While updating the scripting fields, I'm getting compilation error.
Caused by: java.text.ParseException: unexpected character '[' on line (1) position (6)
Caused by: org.antlr.v4.runtime.LexerNoViableAltException
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.