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

JsonLoader does not handle null field values

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.3
    • 3.4
    • None
    • None

    Description

      The parser in JsonLoader does not handle null fields when adding a document over http+json.

      Given this document:

      [{
        "timestamp":"2011-08-17T14:11:49.201Z",
        "correlationId":"N44YFGSQNC",
        "logType":"event",
        "short":"Invalidating session: 4zy6cvdtmvu1erlay0sn6rhz",
        "long":null
      }]
      

      I'm getting a response code=400 and the error message "should finish doc first" in the logs.

      It seems that JsonLoader is missing case for JSONParser.NULL in the parser even switch.

      Attachments

        1. SOLR-2714.patch
          4 kB
          Yonik Seeley

        Activity

          People

            Unassigned Unassigned
            trygvis Trygve Laugstol
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: