Solr
  1. Solr
  2. SOLR-6294

The JsonLoader should accept a single doc without wrapping in an array

    Details

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

      Description

      This is the multi document input command

      curl http://localhost:8983/solr/update/json -H 'Content-type:application/json' -d '
      [
       {"id" : "TestDoc1", "title" : "test1"},
      ]'
      

      The following also should be a valid update command for a single doc

      curl http://localhost:8983/solr/update/json -H 'Content-type:application/json' -d '
       {"id" : "TestDoc1", "title" : "test1"},
      '
      

        Activity

        Noble Paul created issue -
        Noble Paul made changes -
        Field Original Value New Value
        Summary The JsonLoader should accept a single doc without wrapping in the array The JsonLoader should accept a single doc without wrapping in an array
        Noble Paul made changes -
        Description {noformat}
        curl http://localhost:8983/solr/update/json -H 'Content-type:application/json' -d '
        [
         {"id" : "TestDoc1", "title" : "test1"},
        ]'
        {noformat}
        The following also should be a valid update command
        {noformat}
        curl http://localhost:8983/solr/update/json -H 'Content-type:application/json' -d '
         {"id" : "TestDoc1", "title" : "test1"},
        '

        {noformat}
        curl http://localhost:8983/solr/update/json -H 'Content-type:application/json' -d '
        [
         {"id" : "TestDoc1", "title" : "test1"},
        ]'
        {noformat}
        The following also should be a valid update command
        {noformat}
        curl http://localhost:8983/solr/update/json -H 'Content-type:application/json' -d '
         {"id" : "TestDoc1", "title" : "test1"},
        '
        {noformat}
        Noble Paul made changes -
        Description {noformat}
        curl http://localhost:8983/solr/update/json -H 'Content-type:application/json' -d '
        [
         {"id" : "TestDoc1", "title" : "test1"},
        ]'
        {noformat}
        The following also should be a valid update command
        {noformat}
        curl http://localhost:8983/solr/update/json -H 'Content-type:application/json' -d '
         {"id" : "TestDoc1", "title" : "test1"},
        '
        {noformat}
        This is the multi document input command
        {noformat}
        curl http://localhost:8983/solr/update/json -H 'Content-type:application/json' -d '
        [
         {"id" : "TestDoc1", "title" : "test1"},
        ]'
        {noformat}
        The following also should be a valid update command for a single doc
        {noformat}
        curl http://localhost:8983/solr/update/json -H 'Content-type:application/json' -d '
         {"id" : "TestDoc1", "title" : "test1"},
        '
        {noformat}
        Noble Paul made changes -
        Attachment SOLR-6294-6304.patch [ 12658903 ]
        Noble Paul made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Noble Paul
            Reporter:
            Noble Paul
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development