You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Gerald Snyder <gs...@ufl.edu> on 2009/09/25 17:52:11 UTC

FACET_SORT_INDEX descending?

Is there any value for the "f.my_year_facet.facet.sort"  parameter that 
will return the facet values in descending order?   So far I only see 
"index" and "count" as the choices. 

http://lucene.apache.org/solr/api/org/apache/solr/common/params/FacetParams.html#FACET_SORT_INDEX

Thanks.
Gerald Snyder 
Florida Center for Library Automation



Re: FACET_SORT_INDEX descending?

Posted by Gerald Snyder <gs...@ufl.edu>.
Thanks for the answer and the alternative idea.    --Gerald


Chris Hostetter wrote:
> : Reverse alphabetical ordering.   The option "index" provides alphabetical
> : ordering. 
>
> be careful: "index" doesn't mean "alphabetical" -- it means the natural 
> ordering of terms as they exist in the index. for non ascii characters 
> this is not neccessarily something that could be considered alphabetical 
> (or sensical in terms of the locale).
>
> The short answer is: no, there is no way to get "reverse" index order at 
> the moment.
>
> : I have a year_facet field, that I would like to display in reverse order (most
> : recent years first).  Perhaps there is some other way to accomplish this.
>
> the simplest way is to encode the year in some format thta will cause it 
> to naturally sort in the order you want - so instead of indexing "1976" 
> and "2007" you could index "8024:1976" and "7993:2007" and then only 
> display the part that comes after the ":"
>
>
>
> -Hoss
>
>
>   

Re: FACET_SORT_INDEX descending?

Posted by Chris Hostetter <ho...@fucit.org>.
: Reverse alphabetical ordering.   The option "index" provides alphabetical
: ordering. 

be careful: "index" doesn't mean "alphabetical" -- it means the natural 
ordering of terms as they exist in the index. for non ascii characters 
this is not neccessarily something that could be considered alphabetical 
(or sensical in terms of the locale).

The short answer is: no, there is no way to get "reverse" index order at 
the moment.

: I have a year_facet field, that I would like to display in reverse order (most
: recent years first).  Perhaps there is some other way to accomplish this.

the simplest way is to encode the year in some format thta will cause it 
to naturally sort in the order you want - so instead of indexing "1976" 
and "2007" you could index "8024:1976" and "7993:2007" and then only 
display the part that comes after the ":"



-Hoss


Re: FACET_SORT_INDEX descending?

Posted by Gerald Snyder <gs...@ufl.edu>.
Reverse alphabetical ordering.   The option "index" provides 
alphabetical ordering. 

I have a year_facet field, that I would like to display in reverse order 
(most recent years first).  Perhaps there is some other way to 
accomplish this.

Thanks.
--Gerald


Chris Hostetter wrote:
> : Is there any value for the "f.my_year_facet.facet.sort"  parameter that will
> : return the facet values in descending order?   So far I only see "index" and
> : "count" as the choices. 
>
> descending what?
>
> (count is descending order by count)
>
>
>
> -Hoss
>
>
>   

Re: FACET_SORT_INDEX descending?

Posted by Chris Hostetter <ho...@fucit.org>.

: Is there any value for the "f.my_year_facet.facet.sort"  parameter that will
: return the facet values in descending order?   So far I only see "index" and
: "count" as the choices. 

descending what?

(count is descending order by count)



-Hoss