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

SolrJSON reports "invalid key" on valid keys when JSON list of docs has null values

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • update

    Description

      If you index Solr like this, and it works:

      curl 'http://localhot:8983/solr/update/json?wt=json' -H 'Content-type: application/json' -d '[

      { "id": "5", "media_type": "image", "namespace": "foo" }

      ]'

      Then this will fail:

      curl 'http://localhot:8983/solr/update/json?wt=json' -H 'Content-type: application/json' -d '[

      { "id": "5", "media_type": "image", "description": null, "namespace": "foo" }

      ]'

      But it will give a confusing error message:

      SEVERE: org.apache.solr.common.SolrException: invalid key: namespace

      There should be an error message that says "null value not allowed for key: 'description'" or something else that's reasonable.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nhooey Neil Hooey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: