lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Oestreicher (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SOLR-700) NumberFormatTransformer should have configurable locales
Date Thu, 14 Aug 2008 21:25:44 GMT

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

Stefan Oestreicher commented on SOLR-700:
-----------------------------------------

bq. We don't need to be paranoid about this [...]

Ok.

bq. Reading through the docs, another area I'm becoming concerned about is partial parsing
of the string

I see. Interestingly this behaviour of accepting invalid strings seems to only apply to the
generic formatter. I wrote some tests and one of them uses a percent formatter (I also tested
currency) and that throws a ParseException.
Fixing that seems to be even easier than shown in the example :) I already have a patch ready
but I guess I should open another issue for this (seems pretty seperate to me)?

> NumberFormatTransformer should have configurable locales
> --------------------------------------------------------
>
>                 Key: SOLR-700
>                 URL: https://issues.apache.org/jira/browse/SOLR-700
>             Project: Solr
>          Issue Type: Improvement
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.3
>            Reporter: Stefan Oestreicher
>            Assignee: Shalin Shekhar Mangar
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: handler.dataimport.NumberFormatTransformer-locale.patch..txt, handler.dataimport.NumberFormatTransformer-locale.patch..txt,
handler.dataimport.NumberFormatTransformer-locale.patch..txt, handler.dataimport.NumberFormatTransformer-locale.patch..txt,
handler.dataimport.TestNumberFormatTransformer-locale.patch.txt, schema.DateField-locale.patch.txt,
SOLR-700.patch
>
>
> NumberFormatTransformer uses a NumberFormatter which relies on the system locale. This
makes it impossible to use NumberFormatTransformer with data whose locale does not match the
system locale.
> TestNumberFormatTransformer fails on some locales for similar reasons because the grouping
symbol differs in different locales.
> This issue adds a locale attribute for NumberFormatTransformer which allows the user
to specify the locale which should be used for formatting. The locale must be specified as
land-country e.g. en-US
> {code:xml}
> <field column="myNumber" formatStyle="number" locale="de-DE" />
> {code} 

-- 
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