Filtering an aggregated result on child documents?

We have a parent->child mapping of users->purchases

The purchase has a 'total' field, that's a dollar amount.

How can we support a query like -- users who's spent over $1000 dollars in
the past 3 months?

If not currently supported, any suggestions on how it can be done
efficiently with the current APIs?

Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8b54d4b6-a2c2-415d-8839-a42c2f1a2601%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.