lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Digy (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LUCENENET-285) Problem with "CurrentCulture"
Date Thu, 19 Nov 2009 18:47:39 GMT

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

Digy updated LUCENENET-285:
---------------------------

    Attachment: LUCENENET-285.patch

No more failing tests under QueryParser related with CurrentCulture.
I replaced all "System.Sigle.Parse"s  with SupportClass.System.Parse

DIGY

> Problem with "CurrentCulture"
> -----------------------------
>
>                 Key: LUCENENET-285
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-285
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Digy
>         Attachments: LUCENENET-285.patch
>
>
> Hi Folks,
> There is a bug in utilizing Thread.CurrentThread.CurrentCulture.
> A float number such as 2.5 can be converted to string as "2.5" or  "2,5"  depending on
the culture.
> if it is converted to "2,5", some of the tests(ex, TestAnalyzerReturningNull) under "QueryParser"
fails
> _(cause: buffer.Append(minimumSimilarity.ToString()) in FuzzyQuery.cs line 204)_
> Since they make string comparison of the queries.
> There can be two solutions to this
> 1- Changing, for ex, 
> 	_buffer.Append(minimumSimilarity.ToString())_
> 	to
> 	_buffer.Append(SupportClass.Single.ToString(minimumSimilarity)_
> in Lucene.NET core (there may be many other places)
> or
> 2- Changing the current-culture of the test cases to "en-US".
> Solution-2 is the simplest way, but what is the correct one?
> DIGY

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