Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9430

Locale in <propertyWriter in DIH is looked up based on Locale displayName (language tag "en-US" or legacy name "en_US" does not work, English works)

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

      Description

      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

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              uschindler Uwe Schindler
              Reporter:
              bs76 Boris Steiner

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Issue deployment