Hi team
This is part of a watcher that i'm doing, but split part is nor working, this is my example
String indices = "index1\nindex2\n"; String[] arr = indices.split('\n'); return arr;
But i get an error spliting the data
Tested in Painless Lab in Kibana.
Parameters
{ "string_parameter": "index1\nindex2\n" }
Code
String[] myArray = /\n/.split(params.string_parameter); return myArray[0];
Output
index1
sorry for the delay, it works for me!! thanks!
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.