Thanks Hoss for your comments! I don't mind submitting it as a patch, shall I 
create a issue in Jira and submit the patch with that? Also, I didn't modify 
the core solr for locale based sorting; I just added the created a jar file 
with the class file & copied it over to the lib folder. As part of the patch, 
shall I add it to the core solr code-base (users who want to use this don't 
need anything extra to do) or add it as a contrib field (they need to compile 
it as jar and copy it over to the lib folder)?

Thanks!

---------- Original Message ----------
From: Chris Hostetter <hossman_luc...@fucit.org>
To: solr-user@lucene.apache.org
Subject: Re: CJKAnalyzer and Chinese Text sort
Date: Wed, 11 Mar 2009 15:50:40 -0700 (PDT)


First off: you can't sort on a field where any doc has more then one token 
-- that's why worting on a TextField doesn't work unless you use something 
like the KeywordTokenizer.

Second...

: I found out that reason the strings are not getting sorted is because 
: there is no way to pass the locale information to StrField, I ended up 
: extending StrField to take an additional attribute in schema.xml and 
: then had to override the getSortString method where in I create a new 
: Locale based on the schema attribute and pass it to the StrField. I put 
: this newly created jar file in the lib folder and everything seems to be 
: working fine after that. Since, my java knowledge is almost zilch, I was 
: wondering is this the right way to solve this problem or is there any 
: other recommended approach for this?

I don't remember what the state of Locale-based sorting is, but the 
modifications you describe sound right based on what i remember ... would 
you be interested in submitting them back as a patch?

        http://wiki.apache.org/solr/HowToContribute


-Hoss



____________________________________________________________
Be there without being there. Click now for great video conferencing solutions!
http://thirdpartyoffers.netzero.net/TGL2231/fc/BLSrjnxPnB4hOQVqoEYkOC4tiqZzd7wrCMz9gjPk2mJcEaQiXNZxDIlo7b6/

Reply via email to