I am creating a new date field through Lens.
The original field is coming through as text in the format '2022-10-25T16:04:35.320'
In the Set Value field i have...
if (doc.containsKey('sql.metrics.string.starttime')) {
def source = doc['sql.metrics.string.starttime'].value;
if (source != "") {
emit(source);
}
}
However, I am getting the following error...
cannot implicitly cast def [java.lang.String] to long
Hi Marco,
that works....until i am in Discovery which then throws up an error...
"type": "illegal_state_exception",
"reason": "A document doesn't have a value for a field! Use doc[].size()==0 to check if a document is missing a field!"
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.