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 PeterKerk <ve...@hotmail.com> on 2013/11/06 01:00:37 UTC

solr sort facets by name

By default solr sorts facets by the amount of hits for each result. However,
I want to sort by facetnames alphabetically. Earlier I sorted the facets on
the client or via my .NET code, however, this time I need solr to return the
results with alphabetically sorted facets directly.
How?



--
View this message in context: http://lucene.472066.n3.nabble.com/solr-sort-facets-by-name-tp4099499.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: solr sort facets by name

Posted by Toke Eskildsen <te...@statsbiblioteket.dk>.
On Wed, 2013-11-06 at 01:00 +0100, PeterKerk wrote:
> By default solr sorts facets by the amount of hits for each result. However,
> I want to sort by facetnames alphabetically.

That is currently not possible in Solr. You can return then in Unicode
order, as Koji and manju16832003 suggests, but that is only the same as
alphabetic if you lower (or upper) case everything and stick to plain
ASCII.

I mention this because it is a common trap for people with English as
their first language: Names, places, products, just about everything
except for a tightly controlled vocabulary, may contain letters other
than a-z. These letters are after z in Unicode and their sorting
positions have little resemblance to any national alphabetic sorting
rules.

- Toke Eskildsen, State and University Library, Denmark



Re: solr sort facets by name

Posted by manju16832003 <ma...@gmail.com>.
Yes it is
facet.sort=index would return facet result set in alphabetical order



--
View this message in context: http://lucene.472066.n3.nabble.com/solr-sort-facets-by-name-tp4099499p4099522.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: solr sort facets by name

Posted by PeterKerk <ve...@hotmail.com>.
That works, thanks!



--
View this message in context: http://lucene.472066.n3.nabble.com/solr-sort-facets-by-name-tp4099499p4099572.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: solr sort facets by name

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
(13/11/06 9:00), PeterKerk wrote:
> By default solr sorts facets by the amount of hits for each result. However,
> I want to sort by facetnames alphabetically. Earlier I sorted the facets on
> the client or via my .NET code, however, this time I need solr to return the
> results with alphabetically sorted facets directly.
> How?

Isn't it facet.sort=index ?

http://wiki.apache.org/solr/SimpleFacetParameters#facet.sort

koji
-- 
http://soleami.com/blog/automatically-acquiring-synonym-knowledge-from-wikipedia.html