This may help? Note the "Bloomberg Analytics" at the bottom of the post...
https://dzone.com/articles/solr-not-just-for-text-anymore Quote from article: - *Bloomberg Analytics Component for Solr*: Bloomberg Financial Services uses Solr extensively, and found the existing statistical packages woefully lacking. So, they developed a high-performance framework that can perform complex calculations and aggregations on time-series data, and then released it to OpenSource. On Thu, Oct 6, 2016 at 8:53 AM, Shawn Heisey <apa...@elyograg.org> wrote: > On 10/6/2016 12:04 AM, Lewin Joy (TMS) wrote: > > There is a requirement to take an average on "Amount" field against > > each "code" field. And then calculate the averages on this averages. > > Since my "code" field has a very huge cardinality, which could be > > around 200,000 or even in millions ; It gets highly complex to > > calculate the average of averages through Java. Even Solr takes a huge > > time listing the averages. And the JSON response size becomes huge. Is > > there some way we can tackle this? Any way we stats on stats? > > I wasn't sure what you meant with the first sentence I quoted above, but > in order to get statistics from your index that are relevant for the > results of a query, you probably want the stats component. > > https://cwiki.apache.org/confluence/display/solr/The+Stats+Component > > Thanks, > Shawn > >