Use Time Picker parameters in scripts

Is it possible to access the Time Picker parameters (i.e. start time and end time) from a Painless script in a visualization? It would be very useful to define ranges and filters dynamically based on the "main" time field.

No it's not.
Are you running this as a scripted field?

No, but I would like to. Can this be done in some other way?

I am not sure it makes sense to use it in a scripted field attached to a doc, because the time picker will be applied to those docs.

What exactly do you want to do here, what's the end goal?

Actually I wouldn't attach it to a doc (sorry, I misinterpreted the "scripted field" bit in your answer), but rather to a bucket aggregation JSON input; say, if I want to create a filter with a date range starting at the end time of the selected time frame.

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