I have 2 types of document: Contact, and Message. Both with a
Message's parent is Contact.
I'm trying to make a date histogram with 2 values nested in each bucket: total of active users, and how many of them are returning users.
- An active user would be a user with a message in the interval.
- A returning user would be a user with a message in the interval, and a message before the interval.
I'd like to add a filter bucket to each of the histogram buckets, but that filter would need to access the interval's key (the date).
I can't seem to get this right. I've tried using scripts, but I can't access the key.
I've also tried to do the intervals manually, but it doesn't seem to be a very elegant an efficient solution.
Thank you in advance!