I have a huge set of email events of different types e.g.
My goal is:
- get the last 10k
sentevents sorted by a timestamp
- find the timestamp of the earliest event in this subset
- use terms aggregation to get the count of all event types starting from that time till now
I'm having troubles with the first bullet. Is there any way to achieve that with elastic search?