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

Uwe Schindler commented on SOLR-9430:
-------------------------------------

You should have to use the language tag, the old Display name is just for 
backwards compatibility and was removed in latest Lucene versions. 
Unfortunately this part of Solr still uses the old and buggy code.

There is an other issue where all uses of Solr was transformed to use language 
tags (LUCENE-6978), but this one seems to be missing. I will take the issue and 
fix it like the other places.

Please keep in mind, that using "en_US" is no longer supported in Solr, you 
have to use "en-US" since Lucene/Solr 5.5.



> Locale in <propertyWriter in DIH is looked up based on Locale displayName 
> (en_US does not work, English works)
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-9430
>                 URL: https://issues.apache.org/jira/browse/SOLR-9430
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: contrib - DataImportHandler, update
>    Affects Versions: 6.1
>         Environment: all
>            Reporter: Boris Steiner
>            Priority: Minor
>              Labels: DIH, SimpePropertiesWriter, locale, propertyWriter
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> having a DIH with DB datasource and propertyWriter such as:
>  <propertyWriter dateFormat="yyyy-MM-dd HH:mm:ss.SSSSSS" 
> type="SimplePropertiesWriter" locale="en_US" />
> does not work with locale in form en_US as mentioned in documentation; 
> Locale is being looked up by Locale.getDisplayName() which returns human 
> readable representation as opposed to Locale.toLanguageTag, which returns 
> form such as en-US.
> Propertywirter with locale in this form works:
>  <propertyWriter dateFormat="yyyy-MM-dd HH:mm:ss.SSSSSS" 
> type="SimplePropertiesWriter" locale="Slovak" />
> Problematic line code:
> https://github.com/apache/lucene-solr/blob/branch_6_1/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/SimplePropertiesWriter.java#L95



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to