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

NumberFormatTransformer should have configurable locales

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.3
    • 1.3
    • None

    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

      <field column="myNumber" formatStyle="number" locale="de-DE" />
      

      Attachments

        1. SOLR-700.patch
          6 kB
          Shalin Shekhar Mangar
        2. handler.dataimport.NumberFormatTransformer-locale.patch..txt
          3 kB
          Stefan Oestreicher
        3. handler.dataimport.NumberFormatTransformer-locale.patch..txt
          3 kB
          Stefan Oestreicher
        4. handler.dataimport.NumberFormatTransformer-locale.patch..txt
          3 kB
          Stefan Oestreicher
        5. handler.dataimport.NumberFormatTransformer-locale.patch..txt
          2 kB
          Stefan Oestreicher
        6. schema.DateField-locale.patch.txt
          1 kB
          Stefan Oestreicher
        7. handler.dataimport.TestNumberFormatTransformer-locale.patch.txt
          2 kB
          Stefan Oestreicher

        Activity

          People

            shalin Shalin Shekhar Mangar
            dlx Stefan Oestreicher
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: