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)

    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

        1. SOLR-9430.patch
          3 kB
          Uwe Schindler
        2. SOLR-9430.patch
          2 kB
          Uwe Schindler

        Issue Links

          Activity

            People

              uschindler Uwe Schindler
              bs76 Boris Steiner
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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