I'm working on an Solr integration for an e-commerce site. I want to offer a jQuery Slide Range UI (refer http://jqueryui.com/slider/#range).
So visitor will be offered with a slider with min and max price on the page which they can use to define a range and accordingly the filter is applied.
On Solr side, I understand how to make a range filter query on this.
However, for displaying a range I need min and max price value. I'm not sure how to get this from Solr.
Moreover, when other facets are filtered, I need to change this min & max price. But I can not think about how this can be done with Solr. Does solr provide min & max price value in the same query?
How to do this?
Or what is the best practices to implement this with Solr?
I believe you are already getting the facet values of current data set, so as for your range problem you have to sort the facet value on the client side and supply the min & max values to slider.
This way it resolves your other problem too, because with filters applied, the returned resultant values for facets will change too.
Moreover you can add an additional check for not showing sliders in case facets does n't return anything.
For large data ranges , i think you can use solr
stats eg :
Read here about it : http://wiki.apache.org/solr/StatsComponent