Dynamic mapping with 3 level nested data

Hi Everyone,
I want to perform dynamic mapping with three level nested data but I am not able to get.If anybody knows about that then please help me.i am sending my mapping file and data.so In this way i am not able to get the correct mapping.
INDEX:

PUT /icd10_codes1
{
"settings": {
"number_of_shards": 1,
"analysis": {
"filter": {
"autocomplete_filter": {
"type": "edge_ngram",
"min_gram": 1,
"max_gram": 20
}
},
"analyzer": {
"autocomplete": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"lowercase",
"autocomplete_filter"
]
}
}
}
}
}

MAPPING:

PUT /icd10_codes1/_mapping/my_type
{
"properties": {
"name": {
"type": "string",
"analyzer": "autocomplete"
},
"depth":{
"type":"long"
},
"dynamic_templates": [{
"nested_children": {
"match": "children",
"match_mapping_type": "string",
"mapping": {
"index": "analyzed",
"analyzer": "autocomplete"
}
}
}],
"dynamic_templates": [{
"nested_children.children": {
"match": "children.children",
"match_mapping_type": "string",
"mapping": {
"index": "analyzed",
"analyzer": "autocomplete"
}
}
}],
"dynamic_templates": [{
"nested_children.children.children": {
"match": "children.children.children",
"match_mapping_type": "string",
"mapping": {
"index": "analyzed",
"analyzer": "autocomplete"
}
}
}]

      }
    }

DATA:

POST /icd10_codes1/my_type/1
{
"name": "Diseases of the blood and blood-forming organs and certain disorders involving the immune mechanism (D50-D89)",
"depth": 1,
"children": [{
"name": "Nutritional anemias (D50-D53)",
"depth": 2,
"children": [{
"code": "D50",
"name": "Iron deficiency anemia",
"depth": 3,
"children": [{
"code": "D50.0",
"name": "Iron deficiency anemia secondary to blood loss (chronic)",
"depth": 4
}, {
"code": "D50.1",
"name": "Sideropenic dysphagia",
"depth": 4
}, {
"code": "D50.8",
"name": "Other iron deficiency anemias",
"depth": 4
}, {
"code": "D50.9",
"name": "Iron deficiency anemia, unspecified",
"depth": 4
}]
}]
}]
}

I am waiting to reply for anyone

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.