There's nothing that I know of that does what you want. Your problem is that you want some intelligence built in to the faceting. It'd be difficult since Solr couldn't know what a reasonable number of buckets were until it found the entire result set, so you'e have to do some kind of two-pass solution.
So you really have to either create a custom plugin or some such. I suppose you could specify a range with relatively small increments and then combine them in the application. So imagine you have a gap of 10. Look at the facet results and notice that there are 200 facets returned. Have your app re-apportion them more reasonably, creating the appropriate links. I suspect that your products will actually not return that many gaps as prices tend to cluster, but you'd have to experiment. Best Erick On Wed, May 9, 2012 at 11:58 PM, andy <yhl...@sohu.com> wrote: > I am in a E-Comerce project right now, and I have a requirement like this : > > I have a lot of commodities in my SOLR indexes, commodity has the price > field, now I want to do facet range query, > I refer to the solr wiki, the facet range query need specify > *facet.range.gap* or specify *facet.range.spec=*,10,50,100,250,** > because different commodities in different categories has a huge balance, > laptop maybe 500$ more but a pen maybe 10$, so it's hard to specify the > facet range gap > My prefer result is just specify the *counts* that the whole search > result was divided how many parts according to the price > for instance : > I search keyword *phone* and specify the *counts* 5 > return the facet range automatically like this: > 10 > 100 > 100 > 100 > 10 > > and I search keyword *laptop* and specify the *counts* 5 > return the facet range automatically like this: > 10 > 200 > 200 > 100 > 10 > > > does any one know something like this, or other functions can implement my > requirement ? > please give me a favor, > Thank You > > Andy > > > > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/facet-range-query-question-tp3976026.html > Sent from the Solr - User mailing list archive at Nabble.com.