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

Json update handler doesn't support nested documents in streaming mode

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Minor
    • Resolution: Unresolved
    • 6.2.1, 7.0
    • None
    • None
    • None

    Description

      Posting nested documents to /update/json/docs doesn't seem to work for me (but command-based json works just fine). Example:

      #!/bin/bash
      
      curl -X POST 'http://localhost:8983/solr/techproducts/update/json?commit=true' --data-binary '
      {
        "delete": { "query": "*:*" },
      
        "add": {
          "doc": {
            "id": "1",
            "_childDocuments_": [
              {
                "id": "1_1",
                "title": "bar1"
              }
            ]
          }
        },
      
        "commit": {}
      }
      ' 
      
      curl -X POST 'http://localhost:8983/solr/techproducts/update/json/docs?commit=true' --data-binary '
        {
            "id": "2",
            "_childDocuments_": [
              {
                "id": "2_1",
                "title": "bar2"
              }
            ]
        }
      ' 
      

      The nested document with bar2 doesn't make it to the index. On master everything completes successfully. On an older version (6.2.1), the second post results in an exception ("unknown field childDocuments.id).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dweiss Dawid Weiss
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: