Hello, i am newbie in ELK stack. I want to create new field using scripted field in kibana. The new field contain parsed email data from exist field that contain email data too. I just want to get string before @ character in email using regex then i save it in new scripted field. Here my script:
def m = /.*(?=[<@])$/.matcher(doc['email.keyword'].value);
if ( m.matches() ) {
return m.group(1)
} else {
return "no match"
}
Try to run it, but error. How to do that correctly?
Thankyou before
This error are solved, elasticsearch need to restart after edit elasticsearch.yml configuration. But the regex doesn't return any value that i wanted like parsed string email. Am i wrong in writing the statement?
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.