Trying to apply filter on time-difference scripted field

Continuing the discussion from Elasticsearch giving warning for painless script:

time-diff: new Date().getTime() - doc['@timestamp'].value.getMillis()

@rjernst hey Ryan, I need some urgent help regarding this functioning. Using above scripted field I am displaying hosts with their last communication time.

But now i just want to display the hosts with time difference greater than, let's say, 7 days only.
Is there any way to compare the time-diff scripted field and only display those hosts that have not sent events for few days, in this case.

Really appreciate your help!!

@rjernst Hey Ryan, is there any solution to this problem??

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