curl -XPUT "http://192.168.0.39:9200/mygrade" -d '
{
"mappings": {
"grade" : {
"properties" : {
"name" : {
"type" : "string",
"store" : true
}
}
},
"mat": {
"_parent": {
"type": "grade"
}
},
"huaxue": {
"_parent": {
"type": "mat"
}
},
"wuli": {
"_parent": {
"type": "mat"
}
},
"jixie": {
"_parent": {
"type": "mat"
}
}
}
}
'
来源: http://www.bubuko.com/infodetail-2470384.html