You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by bradhill99 <br...@yahoo.com> on 2014/09/05 08:01:33 UTC

Append children documents for nested document

Hi, I have these nested document in solr:
curl http://localhost:8983/solr/update/json?commit=true -H
'Content-type:application/json' -d '
[
  {
    "id": "chapter1",
    "content_type": "chapter",
    "_childDocuments_": [
      {
        "id": "1-1",
        "text": "xxx"
      },
      {
        "id": "1-2",
        "text": "yyy"
      }
    ]
  }
]
'
Then I would like to use atomic updates to add one more child document under
parent document "id":"chapter1", like:
curl http://localhost:8983/solr/update -H 'Content-type:application/json' -d
'
[
 {
  "id" : "chapter1",
  "_childDocuments_" : 
    {
        "add":{
            "id":"1-3", 
            "text": "zzz"
        }
    }
 }
]'

It doesn't work and solr return
{"responseHeader":{"status":400,"QTime":0},"error":{"msg":"Expected:
ARRAY_START but got OBJECT_START at [58]","code":400}}

How can I add children documents for specific parent documents?

thanks,

Brad



--
View this message in context: http://lucene.472066.n3.nabble.com/Append-children-documents-for-nested-document-tp4157087.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Append children documents for nested document

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
It's never possible. You have to reindex whole block.

On Tue, Sep 16, 2014 at 6:20 PM, bradhill99 <br...@yahoo.com> wrote:

> Anyone can help me about this? or Solr not support adding additional
> children
> documents to existed parent document?
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Append-children-documents-for-nested-document-tp4157087p4159152.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
<mk...@griddynamics.com>

Re: Append children documents for nested document

Posted by bradhill99 <br...@yahoo.com>.
Anyone can help me about this? or Solr not support adding additional children
documents to existed parent document?



--
View this message in context: http://lucene.472066.n3.nabble.com/Append-children-documents-for-nested-document-tp4157087p4159152.html
Sent from the Solr - User mailing list archive at Nabble.com.