[jira] Updated: (SOLR-700) test failures because of wrong/unexpected locale

2008-08-14 Thread Shalin Shekhar Mangar (JIRA)

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

Shalin Shekhar Mangar updated SOLR-700:
---

Fix Version/s: 1.3
 Assignee: Shalin Shekhar Mangar
  Description: 
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}

{code} 

  was:
The following unit tests fail if they're run with a german locale:

org.apache.solr.schema.LegacyDateFieldTest
org.apache.solr.schema.DateFieldTest
org.apache.solr.handler.dataimport.TestNumberFormatTransformer

The DateField tests fail because the expected decimal format uses "." as 
separator but the actual result is formatted using the "," separator.
This happens because the ISO8601CanonicalDateFormat class which is defined 
inside the DateField class doesn't specify the US locale when creating the 
formatter used for milliseconds. 
Patch: schema.DateField-locale.patch.txt

TestNumberFormatTransformer failed because 
handler.dataimport.NumberFormatTransformer uses a NumberFormatter which relies 
on the system locale. But I think in this case it's intentional, so I modified 
the test case to use the grouping separator of the system locale. 
Patch: handler.dataimport.TestNumberFormatTransformer-locale.patch.txt

   Issue Type: Improvement  (was: Bug)

> test failures because of wrong/unexpected locale
> 
>
> 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
>
>
> 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}
> 
> {code} 

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



[jira] Updated: (SOLR-700) test failures because of wrong/unexpected locale

2008-08-14 Thread Stefan Oestreicher (JIRA)

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

Stefan Oestreicher updated SOLR-700:


Attachment: handler.dataimport.NumberFormatTransformer-locale.patch..txt

setting the locale to the default locale just to have it changed afterwards if 
the parameter exists is not very nice I guess, so I changed that as well.

Furthermore the user should probably be notified if he supplies an invalid 
locale, but I'm unsure how to proceed in this case, so I leave this for now as 
it is.

> test failures because of wrong/unexpected locale
> 
>
> Key: SOLR-700
> URL: https://issues.apache.org/jira/browse/SOLR-700
> Project: Solr
>  Issue Type: Bug
>  Components: contrib - DataImportHandler
>Affects Versions: 1.3
>Reporter: Stefan Oestreicher
>Priority: Minor
> 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
>
>
> The following unit tests fail if they're run with a german locale:
> org.apache.solr.schema.LegacyDateFieldTest
> org.apache.solr.schema.DateFieldTest
> org.apache.solr.handler.dataimport.TestNumberFormatTransformer
> The DateField tests fail because the expected decimal format uses "." as 
> separator but the actual result is formatted using the "," separator.
> This happens because the ISO8601CanonicalDateFormat class which is defined 
> inside the DateField class doesn't specify the US locale when creating the 
> formatter used for milliseconds. 
> Patch: schema.DateField-locale.patch.txt
> TestNumberFormatTransformer failed because 
> handler.dataimport.NumberFormatTransformer uses a NumberFormatter which 
> relies on the system locale. But I think in this case it's intentional, so I 
> modified the test case to use the grouping separator of the system locale. 
> Patch: handler.dataimport.TestNumberFormatTransformer-locale.patch.txt

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



[jira] Updated: (SOLR-700) test failures because of wrong/unexpected locale

2008-08-14 Thread Stefan Oestreicher (JIRA)

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

Stefan Oestreicher updated SOLR-700:


Attachment: handler.dataimport.NumberFormatTransformer-locale.patch..txt

minor update using the LOCALE constant instead of literal String.

> test failures because of wrong/unexpected locale
> 
>
> Key: SOLR-700
> URL: https://issues.apache.org/jira/browse/SOLR-700
> Project: Solr
>  Issue Type: Bug
>  Components: contrib - DataImportHandler
>Affects Versions: 1.3
>Reporter: Stefan Oestreicher
>Priority: Minor
> Attachments: 
> 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
>
>
> The following unit tests fail if they're run with a german locale:
> org.apache.solr.schema.LegacyDateFieldTest
> org.apache.solr.schema.DateFieldTest
> org.apache.solr.handler.dataimport.TestNumberFormatTransformer
> The DateField tests fail because the expected decimal format uses "." as 
> separator but the actual result is formatted using the "," separator.
> This happens because the ISO8601CanonicalDateFormat class which is defined 
> inside the DateField class doesn't specify the US locale when creating the 
> formatter used for milliseconds. 
> Patch: schema.DateField-locale.patch.txt
> TestNumberFormatTransformer failed because 
> handler.dataimport.NumberFormatTransformer uses a NumberFormatter which 
> relies on the system locale. But I think in this case it's intentional, so I 
> modified the test case to use the grouping separator of the system locale. 
> Patch: handler.dataimport.TestNumberFormatTransformer-locale.patch.txt

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



[jira] Updated: (SOLR-700) test failures because of wrong/unexpected locale

2008-08-14 Thread Stefan Oestreicher (JIRA)

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

Stefan Oestreicher updated SOLR-700:


Attachment: handler.dataimport.NumberFormatTransformer-locale.patch..txt

I see, that's certainly more flexible. I modified the patch.

> test failures because of wrong/unexpected locale
> 
>
> Key: SOLR-700
> URL: https://issues.apache.org/jira/browse/SOLR-700
> Project: Solr
>  Issue Type: Bug
>  Components: contrib - DataImportHandler
>Affects Versions: 1.3
>Reporter: Stefan Oestreicher
>Priority: Minor
> Attachments: 
> handler.dataimport.NumberFormatTransformer-locale.patch..txt, 
> handler.dataimport.NumberFormatTransformer-locale.patch..txt, 
> handler.dataimport.TestNumberFormatTransformer-locale.patch.txt, 
> schema.DateField-locale.patch.txt
>
>
> The following unit tests fail if they're run with a german locale:
> org.apache.solr.schema.LegacyDateFieldTest
> org.apache.solr.schema.DateFieldTest
> org.apache.solr.handler.dataimport.TestNumberFormatTransformer
> The DateField tests fail because the expected decimal format uses "." as 
> separator but the actual result is formatted using the "," separator.
> This happens because the ISO8601CanonicalDateFormat class which is defined 
> inside the DateField class doesn't specify the US locale when creating the 
> formatter used for milliseconds. 
> Patch: schema.DateField-locale.patch.txt
> TestNumberFormatTransformer failed because 
> handler.dataimport.NumberFormatTransformer uses a NumberFormatter which 
> relies on the system locale. But I think in this case it's intentional, so I 
> modified the test case to use the grouping separator of the system locale. 
> Patch: handler.dataimport.TestNumberFormatTransformer-locale.patch.txt

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



[jira] Updated: (SOLR-700) test failures because of wrong/unexpected locale

2008-08-14 Thread Stefan Oestreicher (JIRA)

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

Stefan Oestreicher updated SOLR-700:


Attachment: handler.dataimport.NumberFormatTransformer-locale.patch..txt

based on Shalins suggestion to add an attribute for the locale I prepared 
another patch implementing those changes.

> test failures because of wrong/unexpected locale
> 
>
> Key: SOLR-700
> URL: https://issues.apache.org/jira/browse/SOLR-700
> Project: Solr
>  Issue Type: Bug
>  Components: contrib - DataImportHandler
>Affects Versions: 1.3
>Reporter: Stefan Oestreicher
>Priority: Minor
> Attachments: 
> handler.dataimport.NumberFormatTransformer-locale.patch..txt, 
> handler.dataimport.TestNumberFormatTransformer-locale.patch.txt, 
> schema.DateField-locale.patch.txt
>
>
> The following unit tests fail if they're run with a german locale:
> org.apache.solr.schema.LegacyDateFieldTest
> org.apache.solr.schema.DateFieldTest
> org.apache.solr.handler.dataimport.TestNumberFormatTransformer
> The DateField tests fail because the expected decimal format uses "." as 
> separator but the actual result is formatted using the "," separator.
> This happens because the ISO8601CanonicalDateFormat class which is defined 
> inside the DateField class doesn't specify the US locale when creating the 
> formatter used for milliseconds. 
> Patch: schema.DateField-locale.patch.txt
> TestNumberFormatTransformer failed because 
> handler.dataimport.NumberFormatTransformer uses a NumberFormatter which 
> relies on the system locale. But I think in this case it's intentional, so I 
> modified the test case to use the grouping separator of the system locale. 
> Patch: handler.dataimport.TestNumberFormatTransformer-locale.patch.txt

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



[jira] Updated: (SOLR-700) test failures because of wrong/unexpected locale

2008-08-14 Thread Stefan Oestreicher (JIRA)

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

Stefan Oestreicher updated SOLR-700:


Attachment: schema.DateField-locale.patch.txt

> test failures because of wrong/unexpected locale
> 
>
> Key: SOLR-700
> URL: https://issues.apache.org/jira/browse/SOLR-700
> Project: Solr
>  Issue Type: Bug
>  Components: contrib - DataImportHandler
>Affects Versions: 1.3
>Reporter: Stefan Oestreicher
>Priority: Minor
> Attachments: 
> handler.dataimport.TestNumberFormatTransformer-locale.patch.txt, 
> schema.DateField-locale.patch.txt
>
>
> The following unit tests fail if they're run with a german locale:
> org.apache.solr.schema.LegacyDateFieldTest
> org.apache.solr.schema.DateFieldTest
> org.apache.solr.handler.dataimport.TestNumberFormatTransformer
> The DateField tests fail because the expected decimal format uses "." as 
> separator but the actual result is formatted using the "," separator.
> This happens because the ISO8601CanonicalDateFormat class which is defined 
> inside the DateField class doesn't specify the US locale when creating the 
> formatter used for milliseconds. 
> Patch: schema.DateField-locale.patch.txt
> TestNumberFormatTransformer failed because 
> handler.dataimport.NumberFormatTransformer uses a NumberFormatter which 
> relies on the system locale. But I think in this case it's intentional, so I 
> modified the test case to use the grouping separator of the system locale. 
> Patch: handler.dataimport.TestNumberFormatTransformer-locale.patch.txt

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



[jira] Updated: (SOLR-700) test failures because of wrong/unexpected locale

2008-08-14 Thread Stefan Oestreicher (JIRA)

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

Stefan Oestreicher updated SOLR-700:


Attachment: handler.dataimport.TestNumberFormatTransformer-locale.patch.txt

> test failures because of wrong/unexpected locale
> 
>
> Key: SOLR-700
> URL: https://issues.apache.org/jira/browse/SOLR-700
> Project: Solr
>  Issue Type: Bug
>  Components: contrib - DataImportHandler
>Affects Versions: 1.3
>Reporter: Stefan Oestreicher
>Priority: Minor
> Attachments: 
> handler.dataimport.TestNumberFormatTransformer-locale.patch.txt, 
> schema.DateField-locale.patch.txt
>
>
> The following unit tests fail if they're run with a german locale:
> org.apache.solr.schema.LegacyDateFieldTest
> org.apache.solr.schema.DateFieldTest
> org.apache.solr.handler.dataimport.TestNumberFormatTransformer
> The DateField tests fail because the expected decimal format uses "." as 
> separator but the actual result is formatted using the "," separator.
> This happens because the ISO8601CanonicalDateFormat class which is defined 
> inside the DateField class doesn't specify the US locale when creating the 
> formatter used for milliseconds. 
> Patch: schema.DateField-locale.patch.txt
> TestNumberFormatTransformer failed because 
> handler.dataimport.NumberFormatTransformer uses a NumberFormatter which 
> relies on the system locale. But I think in this case it's intentional, so I 
> modified the test case to use the grouping separator of the system locale. 
> Patch: handler.dataimport.TestNumberFormatTransformer-locale.patch.txt

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