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

custom json loading is wrong when there are multiple toplevel docs w/ child docs

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.5
    • Fix Version/s: 6.6, 7.0
    • Component/s: update
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      Sending two parent docs with nested children in custom JSON leads to hijacking neighbor's children. As a workaround, every parent can be sent separately.
      Let me better describe the problem:

      curl 'http://localhost:8983/solr/my_collection/update/json/docs?split=/|/orgs'\
          -H 'Content-type:application/json' -d '[{
        "name": "Joe Smith", "phone": 876876687, "orgs": [
          {  "name": "Microsoft", "city": "Seattle", "zip": 98052 },
          {   "name": "Apple", "city": "Cupertino", "zip": 95014 }
        ]
       },
      {
        "name": "Frank Miller", "phone": 1234556, "orgs": [
          {  "name": "Oracle", "city": "Redwood", "zip": 98052 },
          {   "name": "HTC", "city": "San Francisco", "zip": 95014 }
        ]
       }
      ] '
      

      produces docs with accumulating children across parents

      {
        "name":"Joe Smith", "phone":876876687,
        "_childDocuments_":[
          { "name":"Microsoft", "city":"Seattle","zip":98052},
          {"name":"Apple","city":"Cupertino","zip":95014}]},
      {
        "name":"Frank Miller", "phone":1234556,
        "_childDocuments_":[
          { "name":"Microsoft", "city":"Seattle","zip":98052},
          {"name":"Apple","city":"Cupertino","zip":95014},
            {  "name": "Oracle", "city": "Redwood", "zip": 98052 },
          {   "name": "HTC", "city": "San Francisco", "zip": 95014 }]}
      

        Attachments

        1. 0001-SOLR-10500-fixed-json-hierarchy-read.patch
          4 kB
          Alexey Suprun
        2. SOLR-10500.patch
          7 kB
          Noble Paul
        3. SOLR-10500.patch
          8 kB
          Mikhail Khludnev
        4. SOLR-10500-test.patch
          2 kB
          Mikhail Khludnev

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mkhludnev Mikhail Khludnev
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: