lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Rochkind <rochk...@jhu.edu>
Subject Re: Is there anyway to sort differently for facet values?
Date Thu, 04 Aug 2011 20:29:17 GMT
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 to do it.

On 8/4/2011 2:43 PM, Way Cool wrote:
> 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 facet.sort. Is there any other ways in Solr?
>
> Thanks in advance,
>
> YH
>
> On Wed, Aug 3, 2011 at 8:35 PM, Erick Erickson<erickerickson@gmail.com>wrote:
>
>> 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.waycool@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 instead of # of docs, and I
>> want
>>> to be able to have a predefined order for certain facets as well. Is that
>>> possible in Solr we can do that?
>>>
>>> Thanks,
>>>
>>> YH

Mime
View raw message