AW: Facet Sort with non ASCII Characters

2013-09-10 Thread Sandro Zbinden
Hey Yonik

It installed the latest Solr (Solr 4.4) and started the jetty configured in the 
example directory. 

To the core collection1 I added three titles. a, b, ä

curl http://localhost:8983/solr/update/json -H 'Content-type:application/json' 
-d '[{id : 1, title : a},{id : 2, title : ä},{id : 3, 
title : b}]'

Now I want to sort these three titles with the following query: 

http://localhost:8983/solr/collection1/select?q=*:*facet=truefacet.sort=indexfacet.field=titlerows=0

I expect:

lst name=title
int name=a1/int
int name=ä1/int
int name=b1/int
/lst

But I receive 

lst name=title
int name=a1/int
int name=b1/int
int name=ä1/int
/lst

PS: In Java I would sort these value with a Comperator that uses 
Collator.getInstance().compare(value1, value2);

Best regards 

Sandro

-Ursprüngliche Nachricht-
Von: ysee...@gmail.com [mailto:ysee...@gmail.com] Im Auftrag von Yonik Seeley
Gesendet: Montag, 9. September 2013 21:26
An: solr-user@lucene.apache.org
Betreff: Re: Facet Sort with non ASCII Characters

On Mon, Sep 9, 2013 at 7:16 AM, Sandro Zbinden zbin...@imagic.ch wrote:
 Is there a plan to add support for alphabetical facet sorting with non ASCII 
 Characters ?

The entire unicode range should already work.  Can you give an example of what 
you would like to see?

-Yonik
http://lucidworks.com


Re: Facet Sort with non ASCII Characters

2013-09-10 Thread Toke Eskildsen
On Mon, 2013-09-09 at 13:16 +0200, Sandro Zbinden wrote:
 Is there a plan to add support for alphabetical facet sorting with non
 ASCII Characters ?

Not to my knowledge. I discussed an idea a year ago about handling it
with modified ICUCollatorKeys, but that solution does not work well with
the way Solr's current analysis-chain for field content works.

See the thread at
http://lucene.472066.n3.nabble.com/Collator-based-facet-sorting-in-Solr-td4006934.html


We do Collator-based sorting of facet values locally with our custom
facet implementation, but it does the sorting after index-open instead
of using CollatorKeys and thus has quite a startup-time penalty.

- Toke Eskildsen, State and University Library, Denmark



Facet Sort with non ASCII Characters

2013-09-09 Thread Sandro Zbinden
Dear solr users

Is there a plan to add support for alphabetical facet sorting with non ASCII 
Characters ?

Best regards Sandro



Sandro Zbinden
Software Engineer





Re: Facet Sort with non ASCII Characters

2013-09-09 Thread Yonik Seeley
On Mon, Sep 9, 2013 at 7:16 AM, Sandro Zbinden zbin...@imagic.ch wrote:
 Is there a plan to add support for alphabetical facet sorting with non ASCII 
 Characters ?

The entire unicode range should already work.  Can you give an example
of what you would like to see?

-Yonik
http://lucidworks.com