It's mean that if field: request.timestamp and response.timestamp exists, then calculate the time difference. If not, return null.
But after I save this on kibana "scripted field" I got an error: "Courier Fetch: 9 of 27 shards failed."
Ok I thoroughly tested scripted fields just now and am not hitting any bug or the error. Can you please check if your field's types are defined correctly in when you created them?
all timestamp fields for version 6.1.1 have a format "text" for version 5.1.1 have format "Unix time". Fields have the same look and same type = date, difference only in "json" view.
for my script, I chose type =number, Format = Number.
this works on es 5.5.1
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.