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

JsonLoader should preserve field value types from the JSON content stream

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

    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

        Issue Links

          Activity

            People

            • Assignee:
              sarowe Steven Rowe
              Reporter:
              sarowe Steven Rowe

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment