Re: Is there anyway to sort differently for facet values?

2011-08-05 Thread Jayendra Patil
you can give it a try with the facet.sort. We had such a requirement for sorting facets by order determined by other field and had to resort to a very crude way to get through it. We pre-pended the facets values with the order in which it had to be displayed ... and used the facet.sort to sort

Re: Is there anyway to sort differently for facet values?

2011-08-05 Thread Way Cool
That's right. It should work if I already know these values ahead of time, however I want to use business rules to control display orders for different search terms. Maybe I have to code it by myself. Thanks everyone. On Fri, Aug 5, 2011 at 12:25 AM, Jayendra Patil jayendra.patil@gmail.com

Re: Is there anyway to sort differently for facet values?

2011-08-04 Thread Way Cool
Thanks Eric for your reply. I am aware of facet.sort, but I haven't used it. I will try that though. Can it handle the values below in the correct order? Under 10 10 - 20 20 - 30 Above 30 Or Small Medium Large XL ... My second question is that if Solr can't do that for the values above by using

Re: Is there anyway to sort differently for facet values?

2011-08-04 Thread Jonathan Rochkind
No, it can not. It just sorts alphabetically, actually by raw byte-order. No other facet sorting functionality is available, and it would be tricky to implement in a performant way because of the way lucene works. But it would certainly be useful to me too if someone could figure out a way

Re: Is there anyway to sort differently for facet values?

2011-08-04 Thread Sethi, Parampreet
It can be achieved by creating own (app specific) custom comparators for fields defined in schema.xml and having an extra attribute to specify the comparator class in the field tag itself. But it will require changes in the Solr to support this feature. (Not sure if it's feasible though just

Re: Is there anyway to sort differently for facet values?

2011-08-03 Thread Erick Erickson
have you looked at the facet.sort parameter? The index value is what I think you want. Best Erick On Aug 3, 2011 7:03 PM, Way Cool way1.wayc...@gmail.com wrote: Hi, guys, Is there anyway to sort differently for facet values? For example, sometimes I want to sort facet values by their values