Github user sebbASF commented on the issue:
https://github.com/apache/incubator-ponymail/issues/270
It looks like the following query returns all the data needed in a single
pass.
The data is aggregated by list name, within that by public/private and
within that by age.
The response should be sufficient to construct the output data.
GET /ponymail/mbox/_search
{
"size": 0,
"aggs": {
"lists": {
"terms": {
"field": "list_raw"
},
"aggs": {
"privacy": {
"terms": {
"field": "private"
},
"aggs": {
"recent": {
"range": {
"field": "epoch",
"ranges": [
{"from": <now-90d>}
]
}
}
}
}
}
}
}
}
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---