Matthew Runo wrote:
Hello folks!
We're trying to code a UI element which requires us to know both the
minimum and maximum values for a given field - say, price.
This seems like it has to be a solved problem, but we're just not sure
of the best way to go about getting this data out of solr. We could
facet on price and then loop through the values to find the min and
max -- but it seems like there's a better way out there.
Is there a way to get a min and max for a given field, in one solr call?
--Matthew Runo
You can use StatsComponent
http://wiki.apache.org/solr/StatsComponent
Koji
--
http://www.rondhuit.com/en/