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

JsonLoader should preserve field value types from the JSON content stream

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.4
    • Component/s: update
    • Labels:
      None

      Description

      JSON content streams carry some basic type information for their field values, as parsed by Noggit: LONG, NUMBER, BIGNUMBER, and BOOLEAN. JsonLoader should set field value object types in the SolrInputDocument according to the content stream's data types.

      Currently JsonLoader converts all non-String-typed field values to String-s.

      There is a comment in JsonLoader.parseSingleFieldValue(), where the convert-everything-to-string logic happens, that says "for legacy reasons, single values s are expected to be strings", but other content streams' type information is not flattened like this, e.g. JavabinLoader.

        Attachments

        1. SOLR-4891-BigInteger-bugfix.patch
          6 kB
          Steve Rowe
        2. SOLR-4891.patch
          9 kB
          Steve Rowe

          Issue Links

            Activity

              People

              • Assignee:
                steve_rowe Steve Rowe
                Reporter:
                steve_rowe Steve Rowe
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: