Hi, I'm having problems with the schema for a nested datatype.
So far, I have the following:
"mappings": {
"note": {
"_all": {
"enabled": false
},
"properties": {
"user_id": {
"type": "long"
},
"creation": {
"type": "date",
"format": "date_hour_minute_second"
},
"deleted": {
"type": "integer"
},
"favourite": {
"type": "integer"
},
"modification": {
"type": "date",
"format": "date_hour_minute_second"
},
"note": {
"type": "text",
"analyzer": "english",
"fields": {
"std": {
"type": "text",
"analyzer": "asset_en_analyzer",
"fields": {
"std": {
"type": "text",
"analyzer": "standard"
}
}
}
}
},
"title": {
"type": "text",
"analyzer": "english",
"fields": {
"std": {
"type": "text",
"analyzer": "asset_en_analyzer",
"fields": {
"std": {
"type": "text",
"analyzer": "standard"
}
}
}
}
},
"links_to_asset": {
"type": "nested",
"properties": {
"note_link_id": {
"type": "long"
},
"user_id": {
"type": "long"
},
"creation": {
"type": "date",
"format": "date_hour_minute_second"
},
"modification": {
"type": "date",
"format": "date_hour_minute_second"
},
"to_asset": {
"type": "long"
},
"from_asset": {
"type": "long"
},
"comment": {
"type": "text",
"analyzer": "english",
"fields": {
"std": {
"type": "text",
"analyzer": "asset_en_analyzer",
"fields": {
"std": {
"type": "text",
"analyzer": "standard"
}
}
}
}
}
}
}
}
}
}
Here, the links_to_asset
appears to be of the proper format (based on the few examples I've been able to find).
However, when I populate Elasticsearch with data, the "type": "nested"
attribute is removed.
Does anyone know how I could fix this?