I'd like to provide price range facets on my site. I know I can do this with a query like:
select?q=video&facet=true&facet.query=price:[*+TO+500]&facet.query=price:[500+TO+*] However, this requires me to know that $500 is a good separator for prices. Is there a way to get Solr to choose the "best" range separator(s)? I'd like to say: facet by price, and split into into 3 price ranges. For the sake of this discussion, let's use a car website as an example. If my query is "2007 BMW", I'm likely to get prices from $50,000 to $80,000, and I'd like to display them in the following ranges: 50K - 60K 60K - 70K 70K - 80K If my query is "student needs car", I'm likely to get prices between $100 and $2000, so my ranges could be: 100 - 600 600 - 900 900 - 2000 In the first example, the range is always $10,000. In the second example, I purposely made each range a different size, because that's how the data may be distributed (i.e. there are approximately the same number of cars in each price range). Has anyone solved a similar need? Thanks! -- View this message in context: http://www.nabble.com/Automatic-Ranges-for-Numeric-Facets-tp17676992p17676992.html Sent from the Solr - User mailing list archive at Nabble.com.