I get some technical emails from many machines. In order to sort them out, if put a [hostname|ip] string either in "from" field, or in the subject.
While I'm trying to write a scripted field to extract them, regex (m.matches()) always return false (.* return false as well). I did enable the "script.painless.regex.enabled: true" option.
Anyone has an idea of what's going wrong ?
I'm using ES and Kibana 5.5.2.
Sample code:
def m = /(.*)/.matcher(doc['from.keyword'].value);
if (m.matches ()) {
return m.group(1)
} else {
return doc['from.keyword'].value
}
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.