Updating document with scripted_metric aggregation result

Hi there,

I have a scripted metric which computes timestamp difference between start and end events [two documents in an index]. Is there any way to update the end event document with the computed time?

Eg,
{name: 'Device2', type: 'start', 'eventTime': '2013-02-19 12:00:00'}
{name: 'Device1', type: 'end', 'eventTime': '2013-02-19 13:00:00'}

I want to update the second document (add aggregated result) as,
{name: 'Device1', type: 'end', 'eventTime': '2013-02-19 13:00:00', 'timeOnEvent':60}

Thanks,
Deepti

Hey,

you need to do this in your application on the client side when you receive the result back.

--Alex

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