Calculate conversion ratio of time series with elasticsearch

I am not sure if it's possible with aggregation, but let's ask to the community!

My documents:

{
    "user" : 1,
    "event" : "search"
},
{
    "user" : 1,
    "event" : "click"
},
{
    "user" : 2,
    "event" : "search"
}

I want to calculate the conversion "search" ==> "click", by day. Here the result is:

{
  "time" : "?",
  "rate" : "50%"
}

I achieved this already by grouping events by user, but I am curions if it's possible to do with data formatted like this.

Thanks you,

Tom