Hello,
I am trying to use the painless script split function in my AWS elasticsearch cluster but it does not seem to be working. I get "Unable to find dynamic method [split] with [1] arguments for class [java.lang.String]."
Any idea?
Many thanks
Hello,
I am trying to use the painless script split function in my AWS elasticsearch cluster but it does not seem to be working. I get "Unable to find dynamic method [split] with [1] arguments for class [java.lang.String]."
Any idea?
Many thanks
I would recommend doing that kind of processing before you index the data. Even it is possible (not sure it is) it will be quite slow to do this at query time and not scale very well.
The split
function for String is not exposed in painless. To use the equivalent, you need to have regexes enabled, and get a Pattern
with slashy strings. Something like this iirc:
/?/.split(value)
As I am using elasticsearch through AWS I am not able to configure the elasticsearch.yml to enable regex. I found a way around it by using the substring method.
Thanks for the answer
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
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.