Hello guys, I need to implement a functionality which requires something similar to aggregate functions in SQL. My Solr schema looks like this:
-doc_id: integer -date: date -value1: integer -value2: integer Basically the index contains some numerical values (value1, value2, etc) per doc and date. Given a date range query, I need to return some stats consolidated by docs for that given date range. I typical response could be something like this: doc_id, sum(value1), avg(value2), sum(value1)/sum(value2). I checked StatsComponent using stats.facet=doc_id but it seems it doesn't cover my needs (especially for complex stats like sum(value1)/sum(value2)). Also checked FieldCollapsing but I couldn't find a way to configure an aggregate function there. Is there any way to implement this, or I will have to resolve it out of Solr? Regards, Esteban