Is it possible to build a query with a relative clause (like self join) - maybe ES2?

We are trying to build a funnel for user actions to find users that are doing one action and then another. The assumed approach for now is to have a "member" document which has child documents of "actions" which have the action name and other properties that we want.

The idea is that I need to see people that did action1 and then did action2, where the order and perhaps time interval is important. So it's easy to get where I have people that did action1 and action2, the hard part is making this relative. Ideally I would want to say something like "where action2.name = 'signup' and action2.timestamp > action1.timestamp";

So these seems like a join, which isn't going to be possible. But I thought maybe there is some trick I don't know about or some other way to store the data or ask the question to accomplish the same thing.

I also thought that perhaps with the pipeline aggregations in ES2 I would be able to do this - but I'm not sure how.

Any ideas or suggestions?