Preview results is generating an empty array

Hi,
I am trying to review the results when creating a script filed.
It is empty.
Is it a bug or a feature?

Kibana 7.3.2

89%20-%20Remote%20Desktop%20Connection
Thanks!

That means that the scripted field returns no results in the last 10 documents. Can you post the scripted field and a doc example so that we can help you debug?

Hi Marius,
Thanks for the reply.
The issue is that I do see results in Kibana. Only missing results in the preview pane.
Code -->

long expiryDate = Long.parseLong(doc['expiry_date_epoch.keyword'].value);
long now = new Date().getTime();
long diff = expiryDate - now;
long days = (diff / (60*60*24*1000));
return days;

Here is the Kibana dashboard, showing results for all documents

Doc example (Removed sensitive data) -->

{ "_index": "monitoring-extrahop-2019-10-24", "_type": "_doc", "_id": "19954e14-304c-48a5-85c0-xxxxxx", "_version": 1, "_score": null, "_source": { "expiry_date_epoch": "1590588000000", "@timestamp": "2019-10-24T09:31:01.677+11:00", "expiry_date": "2020-05-28T00:00:00.000+10:00", "id": "19954e14-304c-48a5-85c0-xxxxxx", "dns_name": "www.example.com:RSA_2048" }, "fields": { "@timestamp": [ "2019-10-23T22:31:01.677Z" ], "expiry_date": [ "2020-05-27T14:00:00.000Z" ], "expiryDate_days": [ 216 ] }, "sort": [ 1571869861677 ] }

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.