I have a large (481k lines) json document with nested arrays of objects. Here's an example:
"ICD10CM.index": {
"version": "2017",
"title": "ICD-10-CM INDEX TO DISEASES and INJURIES",
"letter": [
{
"title": "A",
"mainTerm": [
{
"title": "Aarskog's syndrome",
"code": "Q87.1"
},
{
"title": "Abandonment",
"see": "Maltreatment"
},
{
"title": {
"nemod": "(-astasia) (hysterical)",
"text": "Abasia",
"toString": [
null
]
},
"code": "F44.4"
},
{
"title": {
"nemod": "(cystinosis)",
"text": "Abderhalden-Kaufmann-Lignac syndrome",
"toString": [
null
]
},
"code": "E72.04"
}
To get it to index, do I first have to manually create the mapping of this entire document using "type":"nested"?
e.g.,
{
"mappings": {
"blahblah": {
"properties": {
"ICD10CM.index": {
"type": "string",
"version": {
"type": "string"
},
"title": {
"type": "string"
},
"letter": {
"type": "nested",
"title": {
"type": "string"
},
"mainterm": {
"type": "nested"
"title": {
"type": "string",
},
"code": {
"type": "string"
},
"title": {
"type": "string"
},
"see": {
"type": "string"
},
"title": {
"type": "nested",
"nemod"
}
}
}
}
}
}
}
}
}