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

UpdateRequestProcessors ignore child documents

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 6.2, 7.0
    • None
    • None

    Description

      UpdateRequestProcessors completely ignore child documents. The only exception is AddSchemaFieldsUpdateProcessorFactory. The rest seem to be completely unaware that SolrInputDocument has getChildDocuments() or related methods.

      Easy test (on Solr 6.2):

      This works (with IDs auto-assigned and field names generated):

      bin/solr create -c childtest
      bin/post -c childtest -type application/json -format solr -d '[{"a":1,"b":2}]'
      

      This fails as the second/third command, with "missing ID field":

      bin/post -c childtest -type application/json -format solr -d '[{"a":1,"b":2,"_childDocuments_":[{"c":3,"d":4}]}]'
      

      The message:

      SimplePostTool version 5.0.0
      POSTing args to http://localhost:8983/solr/childtest/update...
      SimplePostTool: WARNING: Solr returned an error #400 (Bad Request) for url: http://localhost:8983/solr/childtest/update
      SimplePostTool: WARNING: Response: {"responseHeader":{"status":400,"QTime":4},"error":{"metadata":["error-class","org.apache.solr.common.SolrException","root-error-class","org.apache.solr.common.SolrException"],"msg":"[doc=null] missing required field: id","code":400}}
      SimplePostTool: WARNING: IOException while reading response: java.io.IOException: Server returned HTTP response code: 400 for URL: http://localhost:8983/solr/childtest/update
      COMMITting Solr index changes to http://localhost:8983/solr/childtest/update...
      Time spent: 0:00:00.042
      

      I also verified it with BlankRemoving URP. I think this is a global problem.

      Attachments

        Activity

          People

            arafalov Alexandre Rafalovitch
            arafalov Alexandre Rafalovitch
            Votes:
            7 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated: