Is there an easy way to get range of values from a particular field after a search query?
For e.g. lets say I have a collection with 100k documents with two fields : "name" (string) and "price"(float). I perform a search that returns 10k documents, which can be displayed at max 250 documents / page - so 40 pages. I want to figure out the min, median, and max price values across the 10k returned documents. The only way I can think of is to retrieve values from page #1 (min price), page#21 (median price), and page#40(max price) if my results are sorted on price:asc.
Is there a simpler way to retrieve a list of all price values from the 10k documents, so I can get the min,max,median more easily?