Hi,

In a JSON request, you can add nested child documents as a single document
or an array of documents.


JSON data:

{
  "id": "1",
  "single_child": {
    "id": "2"
  },
  "children": [{
    "id": "3"
  },
  {
    "id": "4"
  }]
}


Response:

{
  "responseHeader":{
    "status":0,
    "QTime":1,
    "params":{
      "q":"id:1",
      "fl":"id,single_child,children,[child]"}},
  "response":{"numFound":1,"start":0,"numFoundExact":true,"docs":[
      {
        "id":"1",
        "single_child":
        {
          "id":"2"},
        "children":[
          {
            "id":"3"},

          {
            "id":"4"}]}]
  }}


I'm trying to achieve the same with an XML request. What is the correct
syntax for adding that single child as a labelled nested document in XML?


Kind regards,


Thomas

Reply via email to