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

/update/json/docs carry forward fields from previous records

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.1, 6.0
    • None
    • None

    Description

      example

      curl -H 'Content-type:application/json' 'http://localhost:8983/solr/foo/update/json/docs?split=/exams&echo=true&f=/**&indent=true&omitHeader=true' -d '
      {
      'first': 'John',
      'exams': [
      {'subject': 'Maths', 'test'   : 'term1', 'marks':90},
      {'subject': 'Biology', 'test'   : 'term1', 'marks':86}
      ]
      }
      {
      'first': 'Bob',
      'exams': [
      {'subject': 'Maths', 'test': 'term1', 'marks': 95
      }
      ,
      {
      'subject': 'Biology', 'test'   : 'term1', 'marks': 92}
      ]
      }'
      

      produces the following set of docs

      {
            "first":"John",
            "subject":"Maths",
            "test":"term1",
            "marks":90},
          {
            "first":"John",
            "subject":"Biology",
            "test":"term1",
            "marks":86},
          {
            "first":["John",
              "Bob"],
            "subject":"Maths",
            "test":"term1",
            "marks":95},
          {
            "first":["John",
              "Bob"],
            "subject":"Biology",
            "test":"term1",
            "marks":92}
      

      Attachments

        Activity

          People

            noble.paul Noble Paul
            noble.paul Noble Paul
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: