lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Itamar Syn-Hershko (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (LUCENENET-533) StringValue of NumberField is localized
Date Sat, 21 Dec 2013 21:52:09 GMT

     [ https://issues.apache.org/jira/browse/LUCENENET-533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Itamar Syn-Hershko reassigned LUCENENET-533:
--------------------------------------------

    Assignee: Itamar Syn-Hershko

> StringValue of NumberField is localized
> ---------------------------------------
>
>                 Key: LUCENENET-533
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-533
>             Project: Lucene.Net
>          Issue Type: Bug
>          Components: Lucene.Net Core
>    Affects Versions: Lucene.Net 3.0.3, Lucene.Net 3.6, Lucene.Net 4.0
>            Reporter: Morten Gorm Madsen
>            Assignee: Itamar Syn-Hershko
>            Priority: Minor
>              Labels: easyfix
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> The StringValue property of Lucene.Net.Documents.NumericField returns a localized string
value (ie. confusion about the decimal separation character). IMHO it should be a following
the invariant culture whenever possible.
> Suggested fix:
> public override string StringValue
> {
>   get {
>     if (fieldsData == null)
>       return null;
>     if (fieldsData is IConvertible)
>       return ((IConvertible)fieldsData).ToString(CultureInfo.InvariantCulture);
>     
>     return fieldsData.ToString();
>   }
> }



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Mime
View raw message