lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sachin (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SOLR-1073) StrField should allow locale sensitive sorting
Date Thu, 07 May 2009 15:51:30 GMT

    [ https://issues.apache.org/jira/browse/SOLR-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706949#action_12706949
] 

Sachin commented on SOLR-1073:
------------------------------

Hoss: 

1) I didn't add the validation as currently it falls back on the default implementation of
String sort in case the locale is not specified.
2) About the basic test, we've using this on http://cn.allrecipes.com for last month or so
and haven't had users complaining about it (yet). 
3) sortMissingLast & sortMissingTrue wasn't implemented as I only need sorting for a field
which doesn't allow null :) but I'll be quite happy to get that in.

Walter:

Sorry for being a little slow but I didn't understand much (my lack of understanding of java),
can you please elaborate a little?

Thanks!

> StrField should allow locale sensitive sorting
> ----------------------------------------------
>
>                 Key: SOLR-1073
>                 URL: https://issues.apache.org/jira/browse/SOLR-1073
>             Project: Solr
>          Issue Type: Improvement
>         Environment: All
>            Reporter: Sachin
>         Attachments: LocaleStrField.java
>
>
> Currently, StrField does not take a parameter which it can pass to ctor of SortField
making the StrField's sorting rely on the locale of the JVM.  Ideally, StrField should allow
setting the locale in the schema.xml and use it to create a new instance of the SortField
in getSortField() method, something like:
> snip:
>   public SortField getSortField(SchemaField field,boolean reverse)
>   {
> ...
> 		Locale locale = new Locale(lang,country);
> 		return new SortField(field.getName(), locale, reverse);
>  }
> More details about this issue here:
> http://www.nabble.com/CJKAnalyzer-and-Chinese-Text-sort-td22374195.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message