使用方法
- Nested inner hitsedit
创建索引及映射
PUT test
{
"mappings": {
"_doc": {
"properties": {
"comments": {
"type": "nested"
}
}
}
}
}
创建文档
PUT test/_doc/1
{
"title": "Test title",
"comments": [
{
"author": "kimchy",
"number": 1,
"like": "dog"
},
{
"author": "nik9000",
"number": 2,
"like": "dog"
},
{
"author": "tom",
"number": 4,
"like": "cat"
},
{
"author": "nik900",
"number": 2,
"like":