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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 6.5
    • 6.6, 7.0
    • update
    • 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. SOLR-10500-test.patch
          2 kB
          Mikhail Khludnev
        2. 0001-SOLR-10500-fixed-json-hierarchy-read.patch
          4 kB
          Alexey Suprun
        3. SOLR-10500.patch
          8 kB
          Mikhail Khludnev
        4. SOLR-10500.patch
          7 kB
          Noble Paul

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mkhl Mikhail Khludnev
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: