Finding Trending Documents

I have events I would like to store in an es index that look like:

document_id: 1,
event: 'view',
view_at: 2016-01-08T19:46:50Z

Is there a way to use the decay functions in es to find trending documents over the past n hours (e.g. trending over the last day). The examples on decay functions all use a 'total' field, but I"m looking to store single events as they happen and then use es to figure out trending based on this event stream.