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

JsonLoader should preserve field value types from the JSON content stream

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 4.4
    • update
    • 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
          Steven Rowe
        2. SOLR-4891.patch
          9 kB
          Steven Rowe

        Issue Links

          Activity

            People

              sarowe Steven Rowe
              sarowe Steven Rowe
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: